#pragma once
#pragma managed
#using <mscorlib.dll>

#include <Windows.h>
#include "OpenGL.h"
#include "ObjectClasses.h"
#include "Login.h"
#include "Form3.h"
#include "Form 4.h"
#include "SubmitForm.h"
#include "HelpForm.h"
#include "create_Assignment_Form.h"
#include "createStudentForm.h"
#include <stdlib.h>
#include <math.h>
#include "DeleteRequest.h"

#include <list>
#include <string>

//#define PI 3.14159265
bool Start = false;

using namespace System::Runtime::InteropServices;
//bool LoggedIn;
string LoggedInUser;
ns2__getAssignmentsResponse Assignments;
bool cancel = false;
bool showAssignments = false;
namespace OpenGL_on_a_Windows_Form {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;
	using namespace OpenGLForm;
	using namespace std;
	list<TempObject>* Mylist;
	list<TempObject>* MySubList;
	// constants needed for results calculations
	const float g = 9.80665;
	bool isloggedin = false;
	bool isAssignment = false; // Still need to add a way to toggle this
	//int simSelector = 0; // keeps track of which simulation is showing


	/// <summary>
	/// Summary for Form1
	///
	/// WARNING: If you change the name of this class, you will need to change the
	///          'Resource File Name' property for the managed resource compiler tool
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	public ref class Form1 : public System::Windows::Forms::Form
	{
	public:
		Login^ login;
		SubmitForm^ submit;
		HelpForm^ Help;
		createStudentForm^ StudentForm;
		DeleteRequest^ delRequest;

	private: System::Windows::Forms::ToolStripMenuItem^  helpToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  searchDirectoryToolStripMenuItem;
	public: 

	public: 


			 Form3^ createAssignmentForm;
			 create_Assignment_Form^ Aform;
			
	private: System::Windows::Forms::OpenFileDialog^  openFileDialog1;
	private: System::Windows::Forms::ToolStripMenuItem^  saveSimulationToolStripMenuItem;
	private: System::Windows::Forms::SaveFileDialog^  saveFileDialog1;
	private: System::Windows::Forms::ToolStripMenuItem^  editToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  stopSimulationToolStripMenuItem1;
	private: System::Windows::Forms::ToolStripMenuItem^  restartSimulationToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  selectSim1ToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  selectSim2ToolStripMenuItem;

	private: System::Windows::Forms::ToolStripMenuItem^  resetSimulationToolStripMenuItem;
	private: System::Windows::Forms::Label^  lbl1MaxV;
	private: System::Windows::Forms::Label^  label4;


	private: System::Windows::Forms::Label^  lbl1BounceY;

	private: System::Windows::Forms::Label^  label16;
	private: System::Windows::Forms::Label^  lbl1MaxY;

	private: System::Windows::Forms::Label^  label14;
	private: System::Windows::Forms::Label^  label15;
	private: System::Windows::Forms::NumericUpDown^  num1COR;

	private: System::Windows::Forms::Label^  label13;
	private: System::Windows::Forms::NumericUpDown^  num1Velocity;
	private: System::Windows::Forms::Label^  lbl2FinalV2;

	private: System::Windows::Forms::Label^  lbl2FinalV1;
	private: System::Windows::Forms::Label^  label20;
	private: System::Windows::Forms::NumericUpDown^  num2Dist;

	private: System::Windows::Forms::Label^  label19;
	private: System::Windows::Forms::Label^  label18;
	private: System::Windows::Forms::Label^  label17;
	private: System::Windows::Forms::Label^  lbl2CollTime;
	private: System::Windows::Forms::TabPage^  ThrowTab;
	private: System::Windows::Forms::Button^  button2;
	private: System::Windows::Forms::Label^  label22;
	private: System::Windows::Forms::NumericUpDown^  num3Angle;
	private: System::Windows::Forms::Label^  label23;
	private: System::Windows::Forms::NumericUpDown^  num3Velocity;
	private: System::Windows::Forms::Label^  lbl3MaxX;
	private: System::Windows::Forms::Label^  label25;
	private: System::Windows::Forms::Label^  lbl3MaxT;
	private: System::Windows::Forms::Label^  label27;
	private: System::Windows::Forms::Label^  lbl3MaxY;
	private: System::Windows::Forms::Label^  label29;
	private: System::Windows::Forms::Label^  label30;
	private: System::Windows::Forms::NumericUpDown^  num3Height;

	private: System::Windows::Forms::ToolStripMenuItem^  throwingSimToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  addStudentMenu;
	private: System::Windows::Forms::ToolStripMenuItem^  showStudentAssignmentsMenu;
	private: System::Windows::Forms::ToolStripMenuItem^  showStudentsMenu;
	private: System::Windows::Forms::Button^  button3;
	private: System::Windows::Forms::ToolStripMenuItem^  pullySimToolStripMenuItem;
	private: System::Windows::Forms::Button^  button4;
	private: System::Windows::Forms::TabPage^  PulleyTab;
	private: System::Windows::Forms::Label^  label21;
	private: System::Windows::Forms::NumericUpDown^  num4Angle;
	private: System::Windows::Forms::Button^  button5;
	private: System::Windows::Forms::Label^  label2;
	private: System::Windows::Forms::NumericUpDown^  num4COF;
	private: System::Windows::Forms::Label^  label6;
	private: System::Windows::Forms::NumericUpDown^  num4Mass2;
	private: System::Windows::Forms::Label^  lbl4Acc;
	private: System::Windows::Forms::Label^  label28;
	private: System::Windows::Forms::Label^  lbl4Tension;
	private: System::Windows::Forms::Label^  label32;
	private: System::Windows::Forms::Label^  label33;
	private: System::Windows::Forms::NumericUpDown^  num4Mass1;
	private: System::Windows::Forms::Button^  button6;
	private: System::Windows::Forms::Button^  button7;
	private: System::Windows::Forms::TextBox^  editAssignmentTitle;
	private: System::Windows::Forms::ToolStripMenuItem^  addAdministratorToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  addTeacherToolStripMenuItem;
	private: System::Windows::Forms::TabPage^  SpringTab;
	private: System::Windows::Forms::Label^  lbl5X;

	private: System::Windows::Forms::Label^  label40;
	private: System::Windows::Forms::Label^  label24;
	private: System::Windows::Forms::NumericUpDown^  num5Compress;
	private: System::Windows::Forms::Button^  button8;
	private: System::Windows::Forms::Label^  label26;
	private: System::Windows::Forms::NumericUpDown^  num5COF;
	private: System::Windows::Forms::Label^  label31;
	private: System::Windows::Forms::NumericUpDown^  num5K;
private: System::Windows::Forms::Label^  lbl5V;

	private: System::Windows::Forms::Label^  label35;
private: System::Windows::Forms::Label^  lbl5T;

	private: System::Windows::Forms::Label^  label37;
	private: System::Windows::Forms::Label^  label38;
	private: System::Windows::Forms::NumericUpDown^  num5Mass;
private: System::Windows::Forms::Label^  label41;
private: System::Windows::Forms::RichTextBox^  richTextBox1;
private: System::Windows::Forms::Label^  label1;
private: System::Windows::Forms::Panel^  ResultsPanel;
private: System::Windows::Forms::Panel^  panel1;
private: System::Windows::Forms::RichTextBox^  StudentAssignmentDescriptionsBox;
private: System::Windows::Forms::ComboBox^  StudentAssignmentsComboBox;
private: System::Windows::Forms::TextBox^  StudentNameTextBox;
private: System::Windows::Forms::Label^  label42;
private: System::Windows::Forms::Label^  label43;
private: System::Windows::Forms::Button^  button9;
private: System::Windows::Forms::ToolStripMenuItem^  springLaunchToolStripMenuItem;
private: System::Windows::Forms::Button^  button10;
private: System::Windows::Forms::ComboBox^  StudentComboBox;
private: System::Windows::Forms::ToolStripMenuItem^  hideAssignmentsToolStripMenuItem;
private: System::Windows::Forms::Button^  button11;
private: System::Windows::Forms::ToolStripMenuItem^  raceSimToolStripMenuItem;
private: System::Windows::Forms::TabPage^  RaceTab;
private: System::Windows::Forms::Label^  lbl6FinishT2;
private: System::Windows::Forms::Label^  lbl6FinishT1;
private: System::Windows::Forms::Label^  label55;
private: System::Windows::Forms::Label^  label56;
private: System::Windows::Forms::Label^  lbl6Winner;
private: System::Windows::Forms::Label^  lbl6MaxV2;
private: System::Windows::Forms::Label^  lbl6MaxV1;
private: System::Windows::Forms::Label^  label50;
private: System::Windows::Forms::Label^  label51;
private: System::Windows::Forms::Label^  label52;
private: System::Windows::Forms::Button^  button12;
private: System::Windows::Forms::Label^  label36;
private: System::Windows::Forms::Label^  label39;
private: System::Windows::Forms::Label^  label44;
private: System::Windows::Forms::Label^  label45;
private: System::Windows::Forms::Label^  label46;
private: System::Windows::Forms::Label^  label47;
private: System::Windows::Forms::NumericUpDown^  num6COF2;
private: System::Windows::Forms::NumericUpDown^  num6COF1;
private: System::Windows::Forms::NumericUpDown^  num6Mass2;
private: System::Windows::Forms::NumericUpDown^  num6Mass1;
private: System::Windows::Forms::Label^  label34;
private: System::Windows::Forms::TextBox^  textBox1;
private: System::Windows::Forms::Label^  label49;
private: System::Windows::Forms::Label^  label48;
private: System::Windows::Forms::TextBox^  textBox3;
private: System::Windows::Forms::TextBox^  textBox2;
private: System::Windows::Forms::TextBox^  textBox4;
private: System::Windows::Forms::Label^  label53;
private: System::Windows::Forms::Label^  label57;
private: System::Windows::Forms::TextBox^  textBox6;
private: System::Windows::Forms::Label^  label54;
private: System::Windows::Forms::TextBox^  textBox5;
private: System::Windows::Forms::Label^  label60;
private: System::Windows::Forms::TextBox^  textBox9;
private: System::Windows::Forms::Label^  label59;
private: System::Windows::Forms::TextBox^  textBox8;
private: System::Windows::Forms::Label^  label58;
private: System::Windows::Forms::TextBox^  textBox7;
private: System::Windows::Forms::Label^  label61;
private: System::Windows::Forms::TextBox^  textBox10;
private: System::Windows::Forms::Label^  label5;





	public: 
		Form4^ dbURLForm;
		
		Form1(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//

			label5->Location = Point(390,100);
			login = gcnew Login();
			submit = gcnew SubmitForm();
			createAssignmentForm = gcnew Form3();

			Aform = gcnew create_Assignment_Form();
			delRequest = gcnew DeleteRequest();

			dbURLForm = gcnew Form4();
			Help = gcnew HelpForm();
			StudentForm = gcnew createStudentForm();
			//login->ShowDialog();
			//LoggedIn = false;
			OpenGL = gcnew COpenGL(this, 1265, 730); // this changes size of OpenGL Window....
			Mylist = new list<TempObject>;
			selectedSim = 0;

			//if(userName != "")
			//{
				
			//}
			try
			{

			}
			catch(...)
			{

				}
			
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~Form1()
		{
			if (components)
			{
				delete components;
			}
			delete Mylist; // Need to delete all the pointers here.
		}
	private: System::ComponentModel::IContainer^  components;
	protected: 
	private: System::Windows::Forms::Timer^  timer1;
	private: System::Windows::Forms::MenuStrip^  menuStrip1;
	private: System::Windows::Forms::ToolStripMenuItem^  fileToolStripMenuItem;

	private: System::Windows::Forms::ToolStripMenuItem^  openSimulationToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  loginToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  assignmentsToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  settingsToolStripMenuItem;
	private: System::Windows::Forms::ToolStripMenuItem^  databaseSettingsToolStripMenuItem;



	private: System::Windows::Forms::Panel^  AssignmentPanel;
	private: System::Windows::Forms::ComboBox^  AssignmentComboBox;


	private: System::Windows::Forms::Label^  AssignmentsLable;
	private: System::Windows::Forms::RichTextBox^  AssignmentTextBox;

	private: System::Windows::Forms::ToolStripMenuItem^  showAssignmentsToolStripMenuItem;
	private: System::Windows::Forms::TabControl^  SimulationTabs;
	private: System::Windows::Forms::TabPage^  BallTab;
	private: System::Windows::Forms::TabPage^  CollisionTab;

	private: System::Windows::Forms::Button^  button1;
	private: System::Windows::Forms::ToolStripMenuItem^  submitSimulationToolStripMenuItem;


	private: System::Windows::Forms::Label^  label3;



	private: System::Windows::Forms::NumericUpDown^  BHeight;

	private: System::Windows::Forms::Timer^  timer2;
	private: System::Windows::Forms::ToolStripMenuItem^  closeToolStripMenuItem;
	private: System::Windows::Forms::Label^  label12;
	private: System::Windows::Forms::Label^  label11;
	private: System::Windows::Forms::Label^  label10;
	private: System::Windows::Forms::Label^  label9;
	private: System::Windows::Forms::Label^  label8;
	private: System::Windows::Forms::Label^  label7;
private: System::Windows::Forms::NumericUpDown^  num2Vel2;

private: System::Windows::Forms::NumericUpDown^  num2Vel1;

private: System::Windows::Forms::NumericUpDown^  num2Mass2;

private: System::Windows::Forms::NumericUpDown^  num2Mass1;


	private: System::Windows::Forms::ToolStripMenuItem^  createAssignmentToolStripMenuItem;



	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>

		OpenGLForm::COpenGL ^ OpenGL;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->components = (gcnew System::ComponentModel::Container());
			this->timer1 = (gcnew System::Windows::Forms::Timer(this->components));
			this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());
			this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->loginToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->addStudentMenu = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->addTeacherToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->addAdministratorToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->saveSimulationToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->openSimulationToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->closeToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->assignmentsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->showAssignmentsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->hideAssignmentsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->showStudentAssignmentsMenu = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->showStudentsMenu = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->createAssignmentToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->submitSimulationToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->editToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->restartSimulationToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->stopSimulationToolStripMenuItem1 = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->resetSimulationToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->selectSim1ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->selectSim2ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->throwingSimToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->pullySimToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->springLaunchToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->raceSimToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->settingsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->databaseSettingsToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->helpToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->searchDirectoryToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
			this->AssignmentPanel = (gcnew System::Windows::Forms::Panel());
			this->button11 = (gcnew System::Windows::Forms::Button());
			this->button10 = (gcnew System::Windows::Forms::Button());
			this->button9 = (gcnew System::Windows::Forms::Button());
			this->panel1 = (gcnew System::Windows::Forms::Panel());
			this->StudentComboBox = (gcnew System::Windows::Forms::ComboBox());
			this->label43 = (gcnew System::Windows::Forms::Label());
			this->StudentAssignmentDescriptionsBox = (gcnew System::Windows::Forms::RichTextBox());
			this->StudentAssignmentsComboBox = (gcnew System::Windows::Forms::ComboBox());
			this->StudentNameTextBox = (gcnew System::Windows::Forms::TextBox());
			this->label42 = (gcnew System::Windows::Forms::Label());
			this->label41 = (gcnew System::Windows::Forms::Label());
			this->editAssignmentTitle = (gcnew System::Windows::Forms::TextBox());
			this->button7 = (gcnew System::Windows::Forms::Button());
			this->button6 = (gcnew System::Windows::Forms::Button());
			this->button4 = (gcnew System::Windows::Forms::Button());
			this->AssignmentComboBox = (gcnew System::Windows::Forms::ComboBox());
			this->AssignmentsLable = (gcnew System::Windows::Forms::Label());
			this->AssignmentTextBox = (gcnew System::Windows::Forms::RichTextBox());
			this->SimulationTabs = (gcnew System::Windows::Forms::TabControl());
			this->BallTab = (gcnew System::Windows::Forms::TabPage());
			this->textBox1 = (gcnew System::Windows::Forms::TextBox());
			this->label34 = (gcnew System::Windows::Forms::Label());
			this->button3 = (gcnew System::Windows::Forms::Button());
			this->label15 = (gcnew System::Windows::Forms::Label());
			this->num1COR = (gcnew System::Windows::Forms::NumericUpDown());
			this->label13 = (gcnew System::Windows::Forms::Label());
			this->num1Velocity = (gcnew System::Windows::Forms::NumericUpDown());
			this->lbl1BounceY = (gcnew System::Windows::Forms::Label());
			this->label16 = (gcnew System::Windows::Forms::Label());
			this->lbl1MaxY = (gcnew System::Windows::Forms::Label());
			this->label14 = (gcnew System::Windows::Forms::Label());
			this->lbl1MaxV = (gcnew System::Windows::Forms::Label());
			this->label4 = (gcnew System::Windows::Forms::Label());
			this->label3 = (gcnew System::Windows::Forms::Label());
			this->BHeight = (gcnew System::Windows::Forms::NumericUpDown());
			this->CollisionTab = (gcnew System::Windows::Forms::TabPage());
			this->label49 = (gcnew System::Windows::Forms::Label());
			this->label48 = (gcnew System::Windows::Forms::Label());
			this->textBox3 = (gcnew System::Windows::Forms::TextBox());
			this->textBox2 = (gcnew System::Windows::Forms::TextBox());
			this->lbl2CollTime = (gcnew System::Windows::Forms::Label());
			this->lbl2FinalV2 = (gcnew System::Windows::Forms::Label());
			this->lbl2FinalV1 = (gcnew System::Windows::Forms::Label());
			this->label20 = (gcnew System::Windows::Forms::Label());
			this->num2Dist = (gcnew System::Windows::Forms::NumericUpDown());
			this->label19 = (gcnew System::Windows::Forms::Label());
			this->label18 = (gcnew System::Windows::Forms::Label());
			this->label17 = (gcnew System::Windows::Forms::Label());
			this->label12 = (gcnew System::Windows::Forms::Label());
			this->label11 = (gcnew System::Windows::Forms::Label());
			this->label10 = (gcnew System::Windows::Forms::Label());
			this->label9 = (gcnew System::Windows::Forms::Label());
			this->label8 = (gcnew System::Windows::Forms::Label());
			this->label7 = (gcnew System::Windows::Forms::Label());
			this->num2Vel2 = (gcnew System::Windows::Forms::NumericUpDown());
			this->num2Vel1 = (gcnew System::Windows::Forms::NumericUpDown());
			this->num2Mass2 = (gcnew System::Windows::Forms::NumericUpDown());
			this->num2Mass1 = (gcnew System::Windows::Forms::NumericUpDown());
			this->button1 = (gcnew System::Windows::Forms::Button());
			this->ThrowTab = (gcnew System::Windows::Forms::TabPage());
			this->textBox4 = (gcnew System::Windows::Forms::TextBox());
			this->label53 = (gcnew System::Windows::Forms::Label());
			this->button2 = (gcnew System::Windows::Forms::Button());
			this->label22 = (gcnew System::Windows::Forms::Label());
			this->num3Angle = (gcnew System::Windows::Forms::NumericUpDown());
			this->label23 = (gcnew System::Windows::Forms::Label());
			this->num3Velocity = (gcnew System::Windows::Forms::NumericUpDown());
			this->lbl3MaxX = (gcnew System::Windows::Forms::Label());
			this->label25 = (gcnew System::Windows::Forms::Label());
			this->lbl3MaxT = (gcnew System::Windows::Forms::Label());
			this->label27 = (gcnew System::Windows::Forms::Label());
			this->lbl3MaxY = (gcnew System::Windows::Forms::Label());
			this->label29 = (gcnew System::Windows::Forms::Label());
			this->label30 = (gcnew System::Windows::Forms::Label());
			this->num3Height = (gcnew System::Windows::Forms::NumericUpDown());
			this->PulleyTab = (gcnew System::Windows::Forms::TabPage());
			this->label57 = (gcnew System::Windows::Forms::Label());
			this->textBox6 = (gcnew System::Windows::Forms::TextBox());
			this->label54 = (gcnew System::Windows::Forms::Label());
			this->textBox5 = (gcnew System::Windows::Forms::TextBox());
			this->label21 = (gcnew System::Windows::Forms::Label());
			this->num4Angle = (gcnew System::Windows::Forms::NumericUpDown());
			this->button5 = (gcnew System::Windows::Forms::Button());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->num4COF = (gcnew System::Windows::Forms::NumericUpDown());
			this->label6 = (gcnew System::Windows::Forms::Label());
			this->num4Mass2 = (gcnew System::Windows::Forms::NumericUpDown());
			this->lbl4Acc = (gcnew System::Windows::Forms::Label());
			this->label28 = (gcnew System::Windows::Forms::Label());
			this->lbl4Tension = (gcnew System::Windows::Forms::Label());
			this->label32 = (gcnew System::Windows::Forms::Label());
			this->label33 = (gcnew System::Windows::Forms::Label());
			this->num4Mass1 = (gcnew System::Windows::Forms::NumericUpDown());
			this->SpringTab = (gcnew System::Windows::Forms::TabPage());
			this->label60 = (gcnew System::Windows::Forms::Label());
			this->textBox9 = (gcnew System::Windows::Forms::TextBox());
			this->label59 = (gcnew System::Windows::Forms::Label());
			this->textBox8 = (gcnew System::Windows::Forms::TextBox());
			this->label58 = (gcnew System::Windows::Forms::Label());
			this->textBox7 = (gcnew System::Windows::Forms::TextBox());
			this->lbl5X = (gcnew System::Windows::Forms::Label());
			this->label40 = (gcnew System::Windows::Forms::Label());
			this->label24 = (gcnew System::Windows::Forms::Label());
			this->num5Compress = (gcnew System::Windows::Forms::NumericUpDown());
			this->button8 = (gcnew System::Windows::Forms::Button());
			this->label26 = (gcnew System::Windows::Forms::Label());
			this->num5COF = (gcnew System::Windows::Forms::NumericUpDown());
			this->label31 = (gcnew System::Windows::Forms::Label());
			this->num5K = (gcnew System::Windows::Forms::NumericUpDown());
			this->lbl5V = (gcnew System::Windows::Forms::Label());
			this->label35 = (gcnew System::Windows::Forms::Label());
			this->lbl5T = (gcnew System::Windows::Forms::Label());
			this->label37 = (gcnew System::Windows::Forms::Label());
			this->label38 = (gcnew System::Windows::Forms::Label());
			this->num5Mass = (gcnew System::Windows::Forms::NumericUpDown());
			this->RaceTab = (gcnew System::Windows::Forms::TabPage());
			this->label61 = (gcnew System::Windows::Forms::Label());
			this->textBox10 = (gcnew System::Windows::Forms::TextBox());
			this->lbl6FinishT2 = (gcnew System::Windows::Forms::Label());
			this->lbl6FinishT1 = (gcnew System::Windows::Forms::Label());
			this->label55 = (gcnew System::Windows::Forms::Label());
			this->label56 = (gcnew System::Windows::Forms::Label());
			this->lbl6Winner = (gcnew System::Windows::Forms::Label());
			this->lbl6MaxV2 = (gcnew System::Windows::Forms::Label());
			this->lbl6MaxV1 = (gcnew System::Windows::Forms::Label());
			this->label50 = (gcnew System::Windows::Forms::Label());
			this->label51 = (gcnew System::Windows::Forms::Label());
			this->label52 = (gcnew System::Windows::Forms::Label());
			this->button12 = (gcnew System::Windows::Forms::Button());
			this->label36 = (gcnew System::Windows::Forms::Label());
			this->label39 = (gcnew System::Windows::Forms::Label());
			this->label44 = (gcnew System::Windows::Forms::Label());
			this->label45 = (gcnew System::Windows::Forms::Label());
			this->label46 = (gcnew System::Windows::Forms::Label());
			this->label47 = (gcnew System::Windows::Forms::Label());
			this->num6COF2 = (gcnew System::Windows::Forms::NumericUpDown());
			this->num6COF1 = (gcnew System::Windows::Forms::NumericUpDown());
			this->num6Mass2 = (gcnew System::Windows::Forms::NumericUpDown());
			this->num6Mass1 = (gcnew System::Windows::Forms::NumericUpDown());
			this->timer2 = (gcnew System::Windows::Forms::Timer(this->components));
			this->openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog());
			this->saveFileDialog1 = (gcnew System::Windows::Forms::SaveFileDialog());
			this->richTextBox1 = (gcnew System::Windows::Forms::RichTextBox());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->ResultsPanel = (gcnew System::Windows::Forms::Panel());
			this->label5 = (gcnew System::Windows::Forms::Label());
			this->menuStrip1->SuspendLayout();
			this->AssignmentPanel->SuspendLayout();
			this->panel1->SuspendLayout();
			this->SimulationTabs->SuspendLayout();
			this->BallTab->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num1COR))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num1Velocity))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->BHeight))->BeginInit();
			this->CollisionTab->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num2Dist))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num2Vel2))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num2Vel1))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num2Mass2))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num2Mass1))->BeginInit();
			this->ThrowTab->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num3Angle))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num3Velocity))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num3Height))->BeginInit();
			this->PulleyTab->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num4Angle))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num4COF))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num4Mass2))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num4Mass1))->BeginInit();
			this->SpringTab->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num5Compress))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num5COF))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num5K))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num5Mass))->BeginInit();
			this->RaceTab->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num6COF2))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num6COF1))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num6Mass2))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num6Mass1))->BeginInit();
			this->ResultsPanel->SuspendLayout();
			this->SuspendLayout();
			// 
			// timer1
			// 
			this->timer1->Interval = 1;
			this->timer1->Tick += gcnew System::EventHandler(this, &Form1::timer1_Tick);
			// 
			// menuStrip1
			// 
			this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(5) {this->fileToolStripMenuItem, 
				this->assignmentsToolStripMenuItem, this->editToolStripMenuItem, this->settingsToolStripMenuItem, this->helpToolStripMenuItem});
			this->menuStrip1->Location = System::Drawing::Point(0, 0);
			this->menuStrip1->Name = L"menuStrip1";
			this->menuStrip1->Size = System::Drawing::Size(1266, 24);
			this->menuStrip1->TabIndex = 0;
			this->menuStrip1->Text = L"menuStrip1";
			// 
			// fileToolStripMenuItem
			// 
			this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(7) {this->loginToolStripMenuItem, 
				this->addStudentMenu, this->addTeacherToolStripMenuItem, this->addAdministratorToolStripMenuItem, this->saveSimulationToolStripMenuItem, 
				this->openSimulationToolStripMenuItem, this->closeToolStripMenuItem});
			this->fileToolStripMenuItem->Name = L"fileToolStripMenuItem";
			this->fileToolStripMenuItem->Size = System::Drawing::Size(37, 20);
			this->fileToolStripMenuItem->Text = L"File";
			// 
			// loginToolStripMenuItem
			// 
			this->loginToolStripMenuItem->Name = L"loginToolStripMenuItem";
			this->loginToolStripMenuItem->Size = System::Drawing::Size(172, 22);
			this->loginToolStripMenuItem->Text = L"Login";
			this->loginToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::loginToolStripMenuItem_Click);
			// 
			// addStudentMenu
			// 
			this->addStudentMenu->Name = L"addStudentMenu";
			this->addStudentMenu->Size = System::Drawing::Size(172, 22);
			this->addStudentMenu->Text = L"Add Student";
			this->addStudentMenu->Visible = false;
			this->addStudentMenu->Click += gcnew System::EventHandler(this, &Form1::addStudentMenu_Click);
			// 
			// addTeacherToolStripMenuItem
			// 
			this->addTeacherToolStripMenuItem->Enabled = false;
			this->addTeacherToolStripMenuItem->Name = L"addTeacherToolStripMenuItem";
			this->addTeacherToolStripMenuItem->Size = System::Drawing::Size(172, 22);
			this->addTeacherToolStripMenuItem->Text = L"Add Teacher";
			this->addTeacherToolStripMenuItem->Visible = false;
			this->addTeacherToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::addTeacherToolStripMenuItem_Click);
			// 
			// addAdministratorToolStripMenuItem
			// 
			this->addAdministratorToolStripMenuItem->Name = L"addAdministratorToolStripMenuItem";
			this->addAdministratorToolStripMenuItem->Size = System::Drawing::Size(172, 22);
			this->addAdministratorToolStripMenuItem->Text = L"Add Administrator";
			this->addAdministratorToolStripMenuItem->Visible = false;
			this->addAdministratorToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::addAdministratorToolStripMenuItem_Click);
			// 
			// saveSimulationToolStripMenuItem
			// 
			this->saveSimulationToolStripMenuItem->Enabled = false;
			this->saveSimulationToolStripMenuItem->Name = L"saveSimulationToolStripMenuItem";
			this->saveSimulationToolStripMenuItem->Size = System::Drawing::Size(172, 22);
			this->saveSimulationToolStripMenuItem->Text = L"Save Simulation";
			this->saveSimulationToolStripMenuItem->Visible = false;
			this->saveSimulationToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::saveSimulationToolStripMenuItem_Click);
			// 
			// openSimulationToolStripMenuItem
			// 
			this->openSimulationToolStripMenuItem->Enabled = false;
			this->openSimulationToolStripMenuItem->Name = L"openSimulationToolStripMenuItem";
			this->openSimulationToolStripMenuItem->Size = System::Drawing::Size(172, 22);
			this->openSimulationToolStripMenuItem->Text = L"Open Simulation";
			this->openSimulationToolStripMenuItem->Visible = false;
			this->openSimulationToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::openSimulationToolStripMenuItem_Click);
			// 
			// closeToolStripMenuItem
			// 
			this->closeToolStripMenuItem->Name = L"closeToolStripMenuItem";
			this->closeToolStripMenuItem->Size = System::Drawing::Size(172, 22);
			this->closeToolStripMenuItem->Text = L"Close";
			this->closeToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::closeToolStripMenuItem_Click);
			// 
			// assignmentsToolStripMenuItem
			// 
			this->assignmentsToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(6) {this->showAssignmentsToolStripMenuItem, 
				this->hideAssignmentsToolStripMenuItem, this->showStudentAssignmentsMenu, this->showStudentsMenu, this->createAssignmentToolStripMenuItem, 
				this->submitSimulationToolStripMenuItem});
			this->assignmentsToolStripMenuItem->Name = L"assignmentsToolStripMenuItem";
			this->assignmentsToolStripMenuItem->Size = System::Drawing::Size(87, 20);
			this->assignmentsToolStripMenuItem->Text = L"Assignments";
			this->assignmentsToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::assignmentsToolStripMenuItem_Click);
			// 
			// showAssignmentsToolStripMenuItem
			// 
			this->showAssignmentsToolStripMenuItem->Name = L"showAssignmentsToolStripMenuItem";
			this->showAssignmentsToolStripMenuItem->Size = System::Drawing::Size(218, 22);
			this->showAssignmentsToolStripMenuItem->Text = L"Show Assignments";
			this->showAssignmentsToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::showAssignmentsToolStripMenuItem_Click);
			// 
			// hideAssignmentsToolStripMenuItem
			// 
			this->hideAssignmentsToolStripMenuItem->Name = L"hideAssignmentsToolStripMenuItem";
			this->hideAssignmentsToolStripMenuItem->Size = System::Drawing::Size(218, 22);
			this->hideAssignmentsToolStripMenuItem->Text = L"Hide Assignments";
			this->hideAssignmentsToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::hideAssignmentsToolStripMenuItem_Click);
			// 
			// showStudentAssignmentsMenu
			// 
			this->showStudentAssignmentsMenu->Enabled = false;
			this->showStudentAssignmentsMenu->Name = L"showStudentAssignmentsMenu";
			this->showStudentAssignmentsMenu->Size = System::Drawing::Size(218, 22);
			this->showStudentAssignmentsMenu->Text = L"Show Student Assignments";
			this->showStudentAssignmentsMenu->Visible = false;
			this->showStudentAssignmentsMenu->Click += gcnew System::EventHandler(this, &Form1::showStudentAssignmentsMenu_Click);
			// 
			// showStudentsMenu
			// 
			this->showStudentsMenu->Enabled = false;
			this->showStudentsMenu->Name = L"showStudentsMenu";
			this->showStudentsMenu->Size = System::Drawing::Size(218, 22);
			this->showStudentsMenu->Text = L"Show Students";
			this->showStudentsMenu->Visible = false;
			// 
			// createAssignmentToolStripMenuItem
			// 
			this->createAssignmentToolStripMenuItem->Enabled = false;
			this->createAssignmentToolStripMenuItem->Name = L"createAssignmentToolStripMenuItem";
			this->createAssignmentToolStripMenuItem->Size = System::Drawing::Size(218, 22);
			this->createAssignmentToolStripMenuItem->Text = L"Create Assignment";
			this->createAssignmentToolStripMenuItem->Visible = false;
			this->createAssignmentToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::createAssignmentToolStripMenuItem_Click);
			// 
			// submitSimulationToolStripMenuItem
			// 
			this->submitSimulationToolStripMenuItem->Name = L"submitSimulationToolStripMenuItem";
			this->submitSimulationToolStripMenuItem->Size = System::Drawing::Size(218, 22);
			this->submitSimulationToolStripMenuItem->Text = L"Submit Assignment";
			this->submitSimulationToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::submitSimulationToolStripMenuItem_Click);
			// 
			// editToolStripMenuItem
			// 
			this->editToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(9) {this->restartSimulationToolStripMenuItem, 
				this->stopSimulationToolStripMenuItem1, this->resetSimulationToolStripMenuItem, this->selectSim1ToolStripMenuItem, this->selectSim2ToolStripMenuItem, 
				this->throwingSimToolStripMenuItem, this->pullySimToolStripMenuItem, this->springLaunchToolStripMenuItem, this->raceSimToolStripMenuItem});
			this->editToolStripMenuItem->Name = L"editToolStripMenuItem";
			this->editToolStripMenuItem->Size = System::Drawing::Size(82, 20);
			this->editToolStripMenuItem->Text = L"Sim Control";
			this->editToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::editToolStripMenuItem_Click);
			// 
			// restartSimulationToolStripMenuItem
			// 
			this->restartSimulationToolStripMenuItem->Name = L"restartSimulationToolStripMenuItem";
			this->restartSimulationToolStripMenuItem->Size = System::Drawing::Size(173, 22);
			this->restartSimulationToolStripMenuItem->Text = L"Start Simulation";
			this->restartSimulationToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::restartSimulationToolStripMenuItem_Click);
			// 
			// stopSimulationToolStripMenuItem1
			// 
			this->stopSimulationToolStripMenuItem1->Name = L"stopSimulationToolStripMenuItem1";
			this->stopSimulationToolStripMenuItem1->Size = System::Drawing::Size(173, 22);
			this->stopSimulationToolStripMenuItem1->Text = L"Stop Simulation";
			this->stopSimulationToolStripMenuItem1->Click += gcnew System::EventHandler(this, &Form1::stopSimulationToolStripMenuItem1_Click);
			// 
			// resetSimulationToolStripMenuItem
			// 
			this->resetSimulationToolStripMenuItem->Name = L"resetSimulationToolStripMenuItem";
			this->resetSimulationToolStripMenuItem->Size = System::Drawing::Size(173, 22);
			this->resetSimulationToolStripMenuItem->Text = L"Reset Simulation";
			this->resetSimulationToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::resetSimulationToolStripMenuItem_Click);
			// 
			// selectSim1ToolStripMenuItem
			// 
			this->selectSim1ToolStripMenuItem->Name = L"selectSim1ToolStripMenuItem";
			this->selectSim1ToolStripMenuItem->Size = System::Drawing::Size(173, 22);
			this->selectSim1ToolStripMenuItem->Text = L"Ball Sim";
			this->selectSim1ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::selectSim1ToolStripMenuItem_Click);
			// 
			// selectSim2ToolStripMenuItem
			// 
			this->selectSim2ToolStripMenuItem->Name = L"selectSim2ToolStripMenuItem";
			this->selectSim2ToolStripMenuItem->Size = System::Drawing::Size(173, 22);
			this->selectSim2ToolStripMenuItem->Text = L"Collision Sim";
			this->selectSim2ToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::selectSim2ToolStripMenuItem_Click);
			// 
			// throwingSimToolStripMenuItem
			// 
			this->throwingSimToolStripMenuItem->Name = L"throwingSimToolStripMenuItem";
			this->throwingSimToolStripMenuItem->Size = System::Drawing::Size(173, 22);
			this->throwingSimToolStripMenuItem->Text = L"Projectile";
			this->throwingSimToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::throwingSimToolStripMenuItem_Click);
			// 
			// pullySimToolStripMenuItem
			// 
			this->pullySimToolStripMenuItem->Name = L"pullySimToolStripMenuItem";
			this->pullySimToolStripMenuItem->Size = System::Drawing::Size(173, 22);
			this->pullySimToolStripMenuItem->Text = L"Pulley Sim";
			this->pullySimToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::pullySimToolStripMenuItem_Click);
			// 
			// springLaunchToolStripMenuItem
			// 
			this->springLaunchToolStripMenuItem->Name = L"springLaunchToolStripMenuItem";
			this->springLaunchToolStripMenuItem->Size = System::Drawing::Size(173, 22);
			this->springLaunchToolStripMenuItem->Text = L"Spring Launch Sim";
			this->springLaunchToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::springLaunchToolStripMenuItem_Click);
			// 
			// raceSimToolStripMenuItem
			// 
			this->raceSimToolStripMenuItem->Name = L"raceSimToolStripMenuItem";
			this->raceSimToolStripMenuItem->Size = System::Drawing::Size(173, 22);
			this->raceSimToolStripMenuItem->Text = L"Race Sim";
			this->raceSimToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::raceSimToolStripMenuItem_Click);
			// 
			// settingsToolStripMenuItem
			// 
			this->settingsToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(1) {this->databaseSettingsToolStripMenuItem});
			this->settingsToolStripMenuItem->Enabled = false;
			this->settingsToolStripMenuItem->Name = L"settingsToolStripMenuItem";
			this->settingsToolStripMenuItem->Size = System::Drawing::Size(61, 20);
			this->settingsToolStripMenuItem->Text = L"Settings";
			this->settingsToolStripMenuItem->Visible = false;
			// 
			// databaseSettingsToolStripMenuItem
			// 
			this->databaseSettingsToolStripMenuItem->Name = L"databaseSettingsToolStripMenuItem";
			this->databaseSettingsToolStripMenuItem->Size = System::Drawing::Size(167, 22);
			this->databaseSettingsToolStripMenuItem->Text = L"Database Settings";
			this->databaseSettingsToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::databaseSettingsToolStripMenuItem_Click);
			// 
			// helpToolStripMenuItem
			// 
			this->helpToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^  >(1) {this->searchDirectoryToolStripMenuItem});
			this->helpToolStripMenuItem->Name = L"helpToolStripMenuItem";
			this->helpToolStripMenuItem->Size = System::Drawing::Size(44, 20);
			this->helpToolStripMenuItem->Text = L"Help";
			// 
			// searchDirectoryToolStripMenuItem
			// 
			this->searchDirectoryToolStripMenuItem->Name = L"searchDirectoryToolStripMenuItem";
			this->searchDirectoryToolStripMenuItem->Size = System::Drawing::Size(137, 22);
			this->searchDirectoryToolStripMenuItem->Text = L"Information";
			this->searchDirectoryToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::searchDirectoryToolStripMenuItem_Click);
			// 
			// AssignmentPanel
			// 
			this->AssignmentPanel->BackColor = System::Drawing::Color::DarkCyan;
			this->AssignmentPanel->Controls->Add(this->button11);
			this->AssignmentPanel->Controls->Add(this->button10);
			this->AssignmentPanel->Controls->Add(this->button9);
			this->AssignmentPanel->Controls->Add(this->panel1);
			this->AssignmentPanel->Controls->Add(this->label41);
			this->AssignmentPanel->Controls->Add(this->editAssignmentTitle);
			this->AssignmentPanel->Controls->Add(this->button7);
			this->AssignmentPanel->Controls->Add(this->button6);
			this->AssignmentPanel->Controls->Add(this->button4);
			this->AssignmentPanel->Controls->Add(this->AssignmentComboBox);
			this->AssignmentPanel->Controls->Add(this->AssignmentsLable);
			this->AssignmentPanel->Controls->Add(this->AssignmentTextBox);
			this->AssignmentPanel->Enabled = false;
			this->AssignmentPanel->Location = System::Drawing::Point(12, 413);
			this->AssignmentPanel->Name = L"AssignmentPanel";
			this->AssignmentPanel->Size = System::Drawing::Size(931, 267);
			this->AssignmentPanel->TabIndex = 2;
			this->AssignmentPanel->Visible = false;
			this->AssignmentPanel->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &Form1::AssignmentPanel_Paint);
			// 
			// button11
			// 
			this->button11->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button11->Location = System::Drawing::Point(538, 241);
			this->button11->Name = L"button11";
			this->button11->Size = System::Drawing::Size(121, 23);
			this->button11->TabIndex = 10;
			this->button11->Text = L"Delete Student";
			this->button11->UseVisualStyleBackColor = true;
			this->button11->Click += gcnew System::EventHandler(this, &Form1::button11_Click);
			// 
			// button10
			// 
			this->button10->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button10->Location = System::Drawing::Point(745, 241);
			this->button10->Name = L"button10";
			this->button10->Size = System::Drawing::Size(170, 23);
			this->button10->TabIndex = 9;
			this->button10->Text = L"Update Student List";
			this->button10->UseVisualStyleBackColor = true;
			this->button10->Click += gcnew System::EventHandler(this, &Form1::button10_Click);
			// 
			// button9
			// 
			this->button9->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button9->Location = System::Drawing::Point(427, 241);
			this->button9->Name = L"button9";
			this->button9->Size = System::Drawing::Size(85, 23);
			this->button9->TabIndex = 8;
			this->button9->Text = L"UPDATE";
			this->button9->UseVisualStyleBackColor = true;
			this->button9->Click += gcnew System::EventHandler(this, &Form1::button9_Click);
			// 
			// panel1
			// 
			this->panel1->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(128)), static_cast<System::Int32>(static_cast<System::Byte>(255)), 
				static_cast<System::Int32>(static_cast<System::Byte>(255)));
			this->panel1->Controls->Add(this->StudentComboBox);
			this->panel1->Controls->Add(this->label43);
			this->panel1->Controls->Add(this->StudentAssignmentDescriptionsBox);
			this->panel1->Controls->Add(this->StudentAssignmentsComboBox);
			this->panel1->Controls->Add(this->StudentNameTextBox);
			this->panel1->Controls->Add(this->label42);
			this->panel1->Location = System::Drawing::Point(529, 12);
			this->panel1->Name = L"panel1";
			this->panel1->Size = System::Drawing::Size(389, 226);
			this->panel1->TabIndex = 4;
			// 
			// StudentComboBox
			// 
			this->StudentComboBox->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->StudentComboBox->FormattingEnabled = true;
			this->StudentComboBox->Location = System::Drawing::Point(170, 10);
			this->StudentComboBox->Name = L"StudentComboBox";
			this->StudentComboBox->Size = System::Drawing::Size(216, 24);
			this->StudentComboBox->TabIndex = 5;
			this->StudentComboBox->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::StudentComboBox_SelectedIndexChanged);
			// 
			// label43
			// 
			this->label43->AutoSize = true;
			this->label43->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label43->Location = System::Drawing::Point(5, 40);
			this->label43->Name = L"label43";
			this->label43->Size = System::Drawing::Size(159, 20);
			this->label43->TabIndex = 4;
			this->label43->Text = L"Sub. Assignments:";
			// 
			// StudentAssignmentDescriptionsBox
			// 
			this->StudentAssignmentDescriptionsBox->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->StudentAssignmentDescriptionsBox->Location = System::Drawing::Point(8, 70);
			this->StudentAssignmentDescriptionsBox->Name = L"StudentAssignmentDescriptionsBox";
			this->StudentAssignmentDescriptionsBox->ReadOnly = true;
			this->StudentAssignmentDescriptionsBox->Size = System::Drawing::Size(378, 153);
			this->StudentAssignmentDescriptionsBox->TabIndex = 3;
			this->StudentAssignmentDescriptionsBox->Text = L"";
			// 
			// StudentAssignmentsComboBox
			// 
			this->StudentAssignmentsComboBox->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->StudentAssignmentsComboBox->FormattingEnabled = true;
			this->StudentAssignmentsComboBox->Location = System::Drawing::Point(170, 40);
			this->StudentAssignmentsComboBox->Name = L"StudentAssignmentsComboBox";
			this->StudentAssignmentsComboBox->Size = System::Drawing::Size(216, 24);
			this->StudentAssignmentsComboBox->TabIndex = 2;
			this->StudentAssignmentsComboBox->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::StudentAssignmentsComboBox_SelectedIndexChanged);
			// 
			// StudentNameTextBox
			// 
			this->StudentNameTextBox->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->StudentNameTextBox->Location = System::Drawing::Point(182, 70);
			this->StudentNameTextBox->Name = L"StudentNameTextBox";
			this->StudentNameTextBox->Size = System::Drawing::Size(204, 22);
			this->StudentNameTextBox->TabIndex = 1;
			this->StudentNameTextBox->Visible = false;
			// 
			// label42
			// 
			this->label42->AutoSize = true;
			this->label42->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label42->Location = System::Drawing::Point(5, 10);
			this->label42->Name = L"label42";
			this->label42->Size = System::Drawing::Size(137, 20);
			this->label42->TabIndex = 0;
			this->label42->Text = L"Student userID:";
			// 
			// label41
			// 
			this->label41->AutoSize = true;
			this->label41->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->label41->ForeColor = System::Drawing::SystemColors::ButtonHighlight;
			this->label41->Location = System::Drawing::Point(10, 46);
			this->label41->Name = L"label41";
			this->label41->Size = System::Drawing::Size(127, 20);
			this->label41->TabIndex = 7;
			this->label41->Text = L"Change Name:";
			// 
			// editAssignmentTitle
			// 
			this->editAssignmentTitle->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9.75F, System::Drawing::FontStyle::Bold, 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->editAssignmentTitle->Location = System::Drawing::Point(143, 46);
			this->editAssignmentTitle->Name = L"editAssignmentTitle";
			this->editAssignmentTitle->Size = System::Drawing::Size(378, 22);
			this->editAssignmentTitle->TabIndex = 6;
			this->editAssignmentTitle->Visible = false;
			// 
			// button7
			// 
			this->button7->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button7->Location = System::Drawing::Point(3, 241);
			this->button7->Name = L"button7";
			this->button7->Size = System::Drawing::Size(129, 23);
			this->button7->TabIndex = 5;
			this->button7->Text = L"Edit Assignment";
			this->button7->UseVisualStyleBackColor = true;
			this->button7->Visible = false;
			this->button7->Click += gcnew System::EventHandler(this, &Form1::button7_Click);
			// 
			// button6
			// 
			this->button6->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button6->Location = System::Drawing::Point(718, 241);
			this->button6->Name = L"button6";
			this->button6->Size = System::Drawing::Size(21, 23);
			this->button6->TabIndex = 4;
			this->button6->Text = L"View Student Submissions";
			this->button6->UseVisualStyleBackColor = true;
			this->button6->Visible = false;
			this->button6->Click += gcnew System::EventHandler(this, &Form1::button6_Click);
			// 
			// button4
			// 
			this->button4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 8.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button4->Location = System::Drawing::Point(138, 241);
			this->button4->Name = L"button4";
			this->button4->Size = System::Drawing::Size(129, 23);
			this->button4->TabIndex = 3;
			this->button4->Text = L"Delete Assignment";
			this->button4->UseVisualStyleBackColor = true;
			this->button4->Click += gcnew System::EventHandler(this, &Form1::button4_Click);
			// 
			// AssignmentComboBox
			// 
			this->AssignmentComboBox->BackColor = System::Drawing::SystemColors::Window;
			this->AssignmentComboBox->DropDownHeight = 200;
			this->AssignmentComboBox->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->AssignmentComboBox->FormattingEnabled = true;
			this->AssignmentComboBox->IntegralHeight = false;
			this->AssignmentComboBox->Location = System::Drawing::Point(209, 12);
			this->AssignmentComboBox->Name = L"AssignmentComboBox";
			this->AssignmentComboBox->Size = System::Drawing::Size(312, 28);
			this->AssignmentComboBox->TabIndex = 2;
			this->AssignmentComboBox->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::AssignmentComboBox_SelectedIndexChanged);
			// 
			// AssignmentsLable
			// 
			this->AssignmentsLable->AutoSize = true;
			this->AssignmentsLable->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20.25F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->AssignmentsLable->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->AssignmentsLable->Location = System::Drawing::Point(5, 9);
			this->AssignmentsLable->Name = L"AssignmentsLable";
			this->AssignmentsLable->Size = System::Drawing::Size(198, 31);
			this->AssignmentsLable->TabIndex = 1;
			this->AssignmentsLable->Text = L"Assignments: ";
			// 
			// AssignmentTextBox
			// 
			this->AssignmentTextBox->Enabled = false;
			this->AssignmentTextBox->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->AssignmentTextBox->Location = System::Drawing::Point(4, 74);
			this->AssignmentTextBox->Name = L"AssignmentTextBox";
			this->AssignmentTextBox->Size = System::Drawing::Size(519, 164);
			this->AssignmentTextBox->TabIndex = 0;
			this->AssignmentTextBox->Text = L"Description of Selected Assignment Goes here...";
			// 
			// SimulationTabs
			// 
			this->SimulationTabs->Appearance = System::Windows::Forms::TabAppearance::Buttons;
			this->SimulationTabs->Controls->Add(this->BallTab);
			this->SimulationTabs->Controls->Add(this->CollisionTab);
			this->SimulationTabs->Controls->Add(this->ThrowTab);
			this->SimulationTabs->Controls->Add(this->PulleyTab);
			this->SimulationTabs->Controls->Add(this->SpringTab);
			this->SimulationTabs->Controls->Add(this->RaceTab);
			this->SimulationTabs->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SimulationTabs->Location = System::Drawing::Point(12, 36);
			this->SimulationTabs->Multiline = true;
			this->SimulationTabs->Name = L"SimulationTabs";
			this->SimulationTabs->SelectedIndex = 0;
			this->SimulationTabs->Size = System::Drawing::Size(532, 261);
			this->SimulationTabs->TabIndex = 3;
			this->SimulationTabs->Visible = false;
			this->SimulationTabs->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::SimulationTabs_SelectedIndexChanged);
			// 
			// BallTab
			// 
			this->BallTab->BackColor = System::Drawing::Color::DarkCyan;
			this->BallTab->Controls->Add(this->textBox1);
			this->BallTab->Controls->Add(this->label34);
			this->BallTab->Controls->Add(this->button3);
			this->BallTab->Controls->Add(this->label15);
			this->BallTab->Controls->Add(this->num1COR);
			this->BallTab->Controls->Add(this->label13);
			this->BallTab->Controls->Add(this->num1Velocity);
			this->BallTab->Controls->Add(this->lbl1BounceY);
			this->BallTab->Controls->Add(this->label16);
			this->BallTab->Controls->Add(this->lbl1MaxY);
			this->BallTab->Controls->Add(this->label14);
			this->BallTab->Controls->Add(this->lbl1MaxV);
			this->BallTab->Controls->Add(this->label4);
			this->BallTab->Controls->Add(this->label3);
			this->BallTab->Controls->Add(this->BHeight);
			this->BallTab->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->BallTab->Location = System::Drawing::Point(4, 27);
			this->BallTab->Name = L"BallTab";
			this->BallTab->Padding = System::Windows::Forms::Padding(3);
			this->BallTab->Size = System::Drawing::Size(524, 230);
			this->BallTab->TabIndex = 0;
			this->BallTab->Text = L"Bounce Ball";
			// 
			// textBox1
			// 
			this->textBox1->Location = System::Drawing::Point(205, 102);
			this->textBox1->Name = L"textBox1";
			this->textBox1->Size = System::Drawing::Size(130, 29);
			this->textBox1->TabIndex = 20;
			// 
			// label34
			// 
			this->label34->AutoSize = true;
			this->label34->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label34->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label34->Location = System::Drawing::Point(3, 108);
			this->label34->Name = L"label34";
			this->label34->Size = System::Drawing::Size(204, 20);
			this->label34->TabIndex = 19;
			this->label34->Text = L"Calculated Max Velocity:";
			// 
			// button3
			// 
			this->button3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button3->Location = System::Drawing::Point(341, 102);
			this->button3->Name = L"button3";
			this->button3->Size = System::Drawing::Size(177, 29);
			this->button3->TabIndex = 18;
			this->button3->Text = L"Run Simulation";
			this->button3->UseVisualStyleBackColor = true;
			this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click);
			// 
			// label15
			// 
			this->label15->AutoSize = true;
			this->label15->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label15->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label15->Location = System::Drawing::Point(3, 72);
			this->label15->Name = L"label15";
			this->label15->Size = System::Drawing::Size(127, 20);
			this->label15->TabIndex = 17;
			this->label15->Text = L"Coeff of Rest.:";
			// 
			// num1COR
			// 
			this->num1COR->DecimalPlaces = 3;
			this->num1COR->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num1COR->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 131072});
			this->num1COR->Location = System::Drawing::Point(136, 70);
			this->num1COR->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
			this->num1COR->Name = L"num1COR";
			this->num1COR->Size = System::Drawing::Size(120, 26);
			this->num1COR->TabIndex = 16;
			this->num1COR->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {8, 0, 0, 65536});
			// 
			// label13
			// 
			this->label13->AutoSize = true;
			this->label13->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label13->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label13->Location = System::Drawing::Point(6, 41);
			this->label13->Name = L"label13";
			this->label13->Size = System::Drawing::Size(127, 20);
			this->label13->TabIndex = 15;
			this->label13->Text = L"Start Velocity: ";
			// 
			// num1Velocity
			// 
			this->num1Velocity->DecimalPlaces = 3;
			this->num1Velocity->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num1Velocity->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num1Velocity->Location = System::Drawing::Point(136, 39);
			this->num1Velocity->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {30, 0, 0, 0});
			this->num1Velocity->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {30, 0, 0, System::Int32::MinValue});
			this->num1Velocity->Name = L"num1Velocity";
			this->num1Velocity->Size = System::Drawing::Size(120, 26);
			this->num1Velocity->TabIndex = 14;
			// 
			// lbl1BounceY
			// 
			this->lbl1BounceY->AutoSize = true;
			this->lbl1BounceY->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl1BounceY->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl1BounceY->Location = System::Drawing::Point(419, 72);
			this->lbl1BounceY->Name = L"lbl1BounceY";
			this->lbl1BounceY->Size = System::Drawing::Size(0, 20);
			this->lbl1BounceY->TabIndex = 13;
			// 
			// label16
			// 
			this->label16->AutoSize = true;
			this->label16->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label16->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label16->Location = System::Drawing::Point(262, 72);
			this->label16->Name = L"label16";
			this->label16->Size = System::Drawing::Size(168, 20);
			this->label16->TabIndex = 12;
			this->label16->Text = L"1st Bounce Height: ";
			// 
			// lbl1MaxY
			// 
			this->lbl1MaxY->AutoSize = true;
			this->lbl1MaxY->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl1MaxY->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl1MaxY->Location = System::Drawing::Point(361, 16);
			this->lbl1MaxY->Name = L"lbl1MaxY";
			this->lbl1MaxY->Size = System::Drawing::Size(0, 20);
			this->lbl1MaxY->TabIndex = 11;
			// 
			// label14
			// 
			this->label14->AutoSize = true;
			this->label14->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label14->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label14->Location = System::Drawing::Point(262, 16);
			this->label14->Name = L"label14";
			this->label14->Size = System::Drawing::Size(109, 20);
			this->label14->TabIndex = 10;
			this->label14->Text = L"Max Height: ";
			// 
			// lbl1MaxV
			// 
			this->lbl1MaxV->AutoSize = true;
			this->lbl1MaxV->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl1MaxV->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl1MaxV->Location = System::Drawing::Point(372, 41);
			this->lbl1MaxV->Name = L"lbl1MaxV";
			this->lbl1MaxV->Size = System::Drawing::Size(0, 20);
			this->lbl1MaxV->TabIndex = 7;
			// 
			// label4
			// 
			this->label4->AutoSize = true;
			this->label4->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label4->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label4->Location = System::Drawing::Point(262, 41);
			this->label4->Name = L"label4";
			this->label4->Size = System::Drawing::Size(119, 20);
			this->label4->TabIndex = 6;
			this->label4->Text = L"Max Velocity: ";
			// 
			// label3
			// 
			this->label3->AutoSize = true;
			this->label3->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label3->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label3->Location = System::Drawing::Point(6, 12);
			this->label3->Name = L"label3";
			this->label3->Size = System::Drawing::Size(117, 20);
			this->label3->TabIndex = 5;
			this->label3->Text = L"Start Height: ";
			// 
			// BHeight
			// 
			this->BHeight->DecimalPlaces = 3;
			this->BHeight->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->BHeight->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->BHeight->Location = System::Drawing::Point(136, 10);
			this->BHeight->Name = L"BHeight";
			this->BHeight->Size = System::Drawing::Size(120, 26);
			this->BHeight->TabIndex = 1;
			this->BHeight->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {8, 0, 0, 0});
			this->BHeight->ValueChanged += gcnew System::EventHandler(this, &Form1::BHeight_ValueChanged);
			// 
			// CollisionTab
			// 
			this->CollisionTab->BackColor = System::Drawing::Color::DarkCyan;
			this->CollisionTab->Controls->Add(this->label49);
			this->CollisionTab->Controls->Add(this->label48);
			this->CollisionTab->Controls->Add(this->textBox3);
			this->CollisionTab->Controls->Add(this->textBox2);
			this->CollisionTab->Controls->Add(this->lbl2CollTime);
			this->CollisionTab->Controls->Add(this->lbl2FinalV2);
			this->CollisionTab->Controls->Add(this->lbl2FinalV1);
			this->CollisionTab->Controls->Add(this->label20);
			this->CollisionTab->Controls->Add(this->num2Dist);
			this->CollisionTab->Controls->Add(this->label19);
			this->CollisionTab->Controls->Add(this->label18);
			this->CollisionTab->Controls->Add(this->label17);
			this->CollisionTab->Controls->Add(this->label12);
			this->CollisionTab->Controls->Add(this->label11);
			this->CollisionTab->Controls->Add(this->label10);
			this->CollisionTab->Controls->Add(this->label9);
			this->CollisionTab->Controls->Add(this->label8);
			this->CollisionTab->Controls->Add(this->label7);
			this->CollisionTab->Controls->Add(this->num2Vel2);
			this->CollisionTab->Controls->Add(this->num2Vel1);
			this->CollisionTab->Controls->Add(this->num2Mass2);
			this->CollisionTab->Controls->Add(this->num2Mass1);
			this->CollisionTab->Controls->Add(this->button1);
			this->CollisionTab->Location = System::Drawing::Point(4, 27);
			this->CollisionTab->Name = L"CollisionTab";
			this->CollisionTab->Padding = System::Windows::Forms::Padding(3);
			this->CollisionTab->Size = System::Drawing::Size(524, 230);
			this->CollisionTab->TabIndex = 1;
			this->CollisionTab->Text = L"Collision";
			// 
			// label49
			// 
			this->label49->AutoSize = true;
			this->label49->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label49->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label49->Location = System::Drawing::Point(5, 196);
			this->label49->Name = L"label49";
			this->label49->Size = System::Drawing::Size(244, 20);
			this->label49->TabIndex = 27;
			this->label49->Text = L"Calculated Final V Left Mass:";
			// 
			// label48
			// 
			this->label48->AutoSize = true;
			this->label48->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label48->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label48->Location = System::Drawing::Point(3, 169);
			this->label48->Name = L"label48";
			this->label48->Size = System::Drawing::Size(244, 20);
			this->label48->TabIndex = 26;
			this->label48->Text = L"Calculated Final V Left Mass:";
			// 
			// textBox3
			// 
			this->textBox3->Location = System::Drawing::Point(256, 196);
			this->textBox3->Name = L"textBox3";
			this->textBox3->Size = System::Drawing::Size(130, 21);
			this->textBox3->TabIndex = 25;
			// 
			// textBox2
			// 
			this->textBox2->Location = System::Drawing::Point(256, 169);
			this->textBox2->Name = L"textBox2";
			this->textBox2->Size = System::Drawing::Size(130, 21);
			this->textBox2->TabIndex = 24;
			// 
			// lbl2CollTime
			// 
			this->lbl2CollTime->AutoSize = true;
			this->lbl2CollTime->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl2CollTime->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl2CollTime->Location = System::Drawing::Point(128, 136);
			this->lbl2CollTime->Name = L"lbl2CollTime";
			this->lbl2CollTime->Size = System::Drawing::Size(0, 20);
			this->lbl2CollTime->TabIndex = 23;
			// 
			// lbl2FinalV2
			// 
			this->lbl2FinalV2->AutoSize = true;
			this->lbl2FinalV2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl2FinalV2->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl2FinalV2->Location = System::Drawing::Point(306, 116);
			this->lbl2FinalV2->Name = L"lbl2FinalV2";
			this->lbl2FinalV2->Size = System::Drawing::Size(0, 20);
			this->lbl2FinalV2->TabIndex = 22;
			// 
			// lbl2FinalV1
			// 
			this->lbl2FinalV1->AutoSize = true;
			this->lbl2FinalV1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl2FinalV1->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl2FinalV1->Location = System::Drawing::Point(82, 116);
			this->lbl2FinalV1->Name = L"lbl2FinalV1";
			this->lbl2FinalV1->Size = System::Drawing::Size(0, 20);
			this->lbl2FinalV1->TabIndex = 21;
			// 
			// label20
			// 
			this->label20->AutoSize = true;
			this->label20->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label20->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label20->Location = System::Drawing::Point(4, 136);
			this->label20->Name = L"label20";
			this->label20->Size = System::Drawing::Size(124, 20);
			this->label20->TabIndex = 20;
			this->label20->Text = L"Collision Time:";
			// 
			// num2Dist
			// 
			this->num2Dist->DecimalPlaces = 3;
			this->num2Dist->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num2Dist->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num2Dist->Location = System::Drawing::Point(219, 85);
			this->num2Dist->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {38, 0, 0, 0});
			this->num2Dist->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
			this->num2Dist->Name = L"num2Dist";
			this->num2Dist->Size = System::Drawing::Size(120, 26);
			this->num2Dist->TabIndex = 19;
			this->num2Dist->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 0});
			// 
			// label19
			// 
			this->label19->AutoSize = true;
			this->label19->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label19->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label19->Location = System::Drawing::Point(128, 85);
			this->label19->Name = L"label19";
			this->label19->Size = System::Drawing::Size(85, 20);
			this->label19->TabIndex = 18;
			this->label19->Text = L"Distance:";
			// 
			// label18
			// 
			this->label18->AutoSize = true;
			this->label18->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label18->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label18->Location = System::Drawing::Point(230, 116);
			this->label18->Name = L"label18";
			this->label18->Size = System::Drawing::Size(70, 20);
			this->label18->TabIndex = 17;
			this->label18->Text = L"Final V:";
			// 
			// label17
			// 
			this->label17->AutoSize = true;
			this->label17->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label17->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label17->Location = System::Drawing::Point(6, 116);
			this->label17->Name = L"label17";
			this->label17->Size = System::Drawing::Size(70, 20);
			this->label17->TabIndex = 16;
			this->label17->Text = L"Final V:";
			// 
			// label12
			// 
			this->label12->AutoSize = true;
			this->label12->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->label12->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label12->Location = System::Drawing::Point(230, 3);
			this->label12->Name = L"label12";
			this->label12->Size = System::Drawing::Size(112, 24);
			this->label12->TabIndex = 15;
			this->label12->Text = L"Right Mass";
			// 
			// label11
			// 
			this->label11->AutoSize = true;
			this->label11->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->label11->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label11->Location = System::Drawing::Point(5, 3);
			this->label11->Name = L"label11";
			this->label11->Size = System::Drawing::Size(97, 24);
			this->label11->TabIndex = 14;
			this->label11->Text = L"Left Mass";
			// 
			// label10
			// 
			this->label10->AutoSize = true;
			this->label10->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label10->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label10->Location = System::Drawing::Point(6, 56);
			this->label10->Name = L"label10";
			this->label10->Size = System::Drawing::Size(77, 20);
			this->label10->TabIndex = 13;
			this->label10->Text = L"Velocity:";
			// 
			// label9
			// 
			this->label9->AutoSize = true;
			this->label9->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label9->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label9->Location = System::Drawing::Point(230, 56);
			this->label9->Name = L"label9";
			this->label9->Size = System::Drawing::Size(77, 20);
			this->label9->TabIndex = 12;
			this->label9->Text = L"Velocity:";
			// 
			// label8
			// 
			this->label8->AutoSize = true;
			this->label8->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label8->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label8->Location = System::Drawing::Point(230, 29);
			this->label8->Name = L"label8";
			this->label8->Size = System::Drawing::Size(56, 20);
			this->label8->TabIndex = 11;
			this->label8->Text = L"Mass:";
			// 
			// label7
			// 
			this->label7->AutoSize = true;
			this->label7->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label7->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label7->Location = System::Drawing::Point(6, 27);
			this->label7->Name = L"label7";
			this->label7->Size = System::Drawing::Size(56, 20);
			this->label7->TabIndex = 10;
			this->label7->Text = L"Mass:";
			// 
			// num2Vel2
			// 
			this->num2Vel2->DecimalPlaces = 3;
			this->num2Vel2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num2Vel2->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num2Vel2->Location = System::Drawing::Point(313, 56);
			this->num2Vel2->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {0, 0, 0, 0});
			this->num2Vel2->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {30, 0, 0, System::Int32::MinValue});
			this->num2Vel2->Name = L"num2Vel2";
			this->num2Vel2->Size = System::Drawing::Size(120, 26);
			this->num2Vel2->TabIndex = 9;
			this->num2Vel2->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, System::Int32::MinValue});
			// 
			// num2Vel1
			// 
			this->num2Vel1->DecimalPlaces = 3;
			this->num2Vel1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num2Vel1->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num2Vel1->Location = System::Drawing::Point(86, 56);
			this->num2Vel1->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {30, 0, 0, 0});
			this->num2Vel1->Name = L"num2Vel1";
			this->num2Vel1->Size = System::Drawing::Size(120, 26);
			this->num2Vel1->TabIndex = 8;
			this->num2Vel1->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 0});
			// 
			// num2Mass2
			// 
			this->num2Mass2->DecimalPlaces = 3;
			this->num2Mass2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num2Mass2->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num2Mass2->Location = System::Drawing::Point(313, 27);
			this->num2Mass2->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 196608});
			this->num2Mass2->Name = L"num2Mass2";
			this->num2Mass2->Size = System::Drawing::Size(120, 26);
			this->num2Mass2->TabIndex = 7;
			this->num2Mass2->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {3, 0, 0, 0});
			// 
			// num2Mass1
			// 
			this->num2Mass1->DecimalPlaces = 3;
			this->num2Mass1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num2Mass1->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num2Mass1->Location = System::Drawing::Point(86, 27);
			this->num2Mass1->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 196608});
			this->num2Mass1->Name = L"num2Mass1";
			this->num2Mass1->Size = System::Drawing::Size(120, 26);
			this->num2Mass1->TabIndex = 6;
			this->num2Mass1->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0});
			// 
			// button1
			// 
			this->button1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button1->Location = System::Drawing::Point(256, 223);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(252, 33);
			this->button1->TabIndex = 1;
			this->button1->Text = L"Run Simulation";
			this->button1->UseVisualStyleBackColor = true;
			this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
			// 
			// ThrowTab
			// 
			this->ThrowTab->BackColor = System::Drawing::Color::DarkCyan;
			this->ThrowTab->Controls->Add(this->textBox4);
			this->ThrowTab->Controls->Add(this->label53);
			this->ThrowTab->Controls->Add(this->button2);
			this->ThrowTab->Controls->Add(this->label22);
			this->ThrowTab->Controls->Add(this->num3Angle);
			this->ThrowTab->Controls->Add(this->label23);
			this->ThrowTab->Controls->Add(this->num3Velocity);
			this->ThrowTab->Controls->Add(this->lbl3MaxX);
			this->ThrowTab->Controls->Add(this->label25);
			this->ThrowTab->Controls->Add(this->lbl3MaxT);
			this->ThrowTab->Controls->Add(this->label27);
			this->ThrowTab->Controls->Add(this->lbl3MaxY);
			this->ThrowTab->Controls->Add(this->label29);
			this->ThrowTab->Controls->Add(this->label30);
			this->ThrowTab->Controls->Add(this->num3Height);
			this->ThrowTab->Location = System::Drawing::Point(4, 27);
			this->ThrowTab->Name = L"ThrowTab";
			this->ThrowTab->Size = System::Drawing::Size(524, 230);
			this->ThrowTab->TabIndex = 2;
			this->ThrowTab->Text = L"Projectile";
			// 
			// textBox4
			// 
			this->textBox4->Location = System::Drawing::Point(228, 92);
			this->textBox4->Name = L"textBox4";
			this->textBox4->Size = System::Drawing::Size(130, 21);
			this->textBox4->TabIndex = 32;
			// 
			// label53
			// 
			this->label53->AutoSize = true;
			this->label53->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label53->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label53->Location = System::Drawing::Point(3, 93);
			this->label53->Name = L"label53";
			this->label53->Size = System::Drawing::Size(219, 20);
			this->label53->TabIndex = 31;
			this->label53->Text = L"Calculated Final Distance:";
			// 
			// button2
			// 
			this->button2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button2->Location = System::Drawing::Point(364, 88);
			this->button2->Name = L"button2";
			this->button2->Size = System::Drawing::Size(144, 31);
			this->button2->TabIndex = 30;
			this->button2->Text = L"Run Simulation";
			this->button2->UseVisualStyleBackColor = true;
			this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click_1);
			// 
			// label22
			// 
			this->label22->AutoSize = true;
			this->label22->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label22->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label22->Location = System::Drawing::Point(3, 63);
			this->label22->Name = L"label22";
			this->label22->Size = System::Drawing::Size(60, 20);
			this->label22->TabIndex = 29;
			this->label22->Text = L"Angle:";
			// 
			// num3Angle
			// 
			this->num3Angle->DecimalPlaces = 3;
			this->num3Angle->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num3Angle->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 131072});
			this->num3Angle->Location = System::Drawing::Point(136, 61);
			this->num3Angle->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {90, 0, 0, 0});
			this->num3Angle->Name = L"num3Angle";
			this->num3Angle->Size = System::Drawing::Size(120, 26);
			this->num3Angle->TabIndex = 28;
			this->num3Angle->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {30, 0, 0, 0});
			// 
			// label23
			// 
			this->label23->AutoSize = true;
			this->label23->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label23->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label23->Location = System::Drawing::Point(3, 36);
			this->label23->Name = L"label23";
			this->label23->Size = System::Drawing::Size(127, 20);
			this->label23->TabIndex = 27;
			this->label23->Text = L"Start Velocity: ";
			// 
			// num3Velocity
			// 
			this->num3Velocity->DecimalPlaces = 3;
			this->num3Velocity->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num3Velocity->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num3Velocity->Location = System::Drawing::Point(136, 34);
			this->num3Velocity->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {50, 0, 0, 0});
			this->num3Velocity->Name = L"num3Velocity";
			this->num3Velocity->Size = System::Drawing::Size(120, 26);
			this->num3Velocity->TabIndex = 26;
			this->num3Velocity->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {10, 0, 0, 0});
			// 
			// lbl3MaxX
			// 
			this->lbl3MaxX->AutoSize = true;
			this->lbl3MaxX->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl3MaxX->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl3MaxX->Location = System::Drawing::Point(387, 63);
			this->lbl3MaxX->Name = L"lbl3MaxX";
			this->lbl3MaxX->Size = System::Drawing::Size(0, 20);
			this->lbl3MaxX->TabIndex = 25;
			// 
			// label25
			// 
			this->label25->AutoSize = true;
			this->label25->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label25->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label25->Location = System::Drawing::Point(262, 63);
			this->label25->Name = L"label25";
			this->label25->Size = System::Drawing::Size(129, 20);
			this->label25->TabIndex = 24;
			this->label25->Text = L"Final Distance:";
			// 
			// lbl3MaxT
			// 
			this->lbl3MaxT->AutoSize = true;
			this->lbl3MaxT->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl3MaxT->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl3MaxT->Location = System::Drawing::Point(377, 34);
			this->lbl3MaxT->Name = L"lbl3MaxT";
			this->lbl3MaxT->Size = System::Drawing::Size(0, 20);
			this->lbl3MaxT->TabIndex = 23;
			// 
			// label27
			// 
			this->label27->AutoSize = true;
			this->label27->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label27->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label27->Location = System::Drawing::Point(262, 34);
			this->label27->Name = L"label27";
			this->label27->Size = System::Drawing::Size(102, 20);
			this->label27->TabIndex = 22;
			this->label27->Text = L"Land Time: ";
			// 
			// lbl3MaxY
			// 
			this->lbl3MaxY->AutoSize = true;
			this->lbl3MaxY->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl3MaxY->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl3MaxY->Location = System::Drawing::Point(377, 9);
			this->lbl3MaxY->Name = L"lbl3MaxY";
			this->lbl3MaxY->Size = System::Drawing::Size(0, 20);
			this->lbl3MaxY->TabIndex = 21;
			// 
			// label29
			// 
			this->label29->AutoSize = true;
			this->label29->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label29->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label29->Location = System::Drawing::Point(262, 9);
			this->label29->Name = L"label29";
			this->label29->Size = System::Drawing::Size(109, 20);
			this->label29->TabIndex = 20;
			this->label29->Text = L"Max Height: ";
			// 
			// label30
			// 
			this->label30->AutoSize = true;
			this->label30->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label30->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label30->Location = System::Drawing::Point(3, 9);
			this->label30->Name = L"label30";
			this->label30->Size = System::Drawing::Size(117, 20);
			this->label30->TabIndex = 19;
			this->label30->Text = L"Start Height: ";
			// 
			// num3Height
			// 
			this->num3Height->DecimalPlaces = 3;
			this->num3Height->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num3Height->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num3Height->Location = System::Drawing::Point(136, 7);
			this->num3Height->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {50, 0, 0, 0});
			this->num3Height->Name = L"num3Height";
			this->num3Height->Size = System::Drawing::Size(120, 26);
			this->num3Height->TabIndex = 18;
			this->num3Height->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {8, 0, 0, 0});
			// 
			// PulleyTab
			// 
			this->PulleyTab->BackColor = System::Drawing::Color::DarkCyan;
			this->PulleyTab->Controls->Add(this->label57);
			this->PulleyTab->Controls->Add(this->textBox6);
			this->PulleyTab->Controls->Add(this->label54);
			this->PulleyTab->Controls->Add(this->textBox5);
			this->PulleyTab->Controls->Add(this->label21);
			this->PulleyTab->Controls->Add(this->num4Angle);
			this->PulleyTab->Controls->Add(this->button5);
			this->PulleyTab->Controls->Add(this->label2);
			this->PulleyTab->Controls->Add(this->num4COF);
			this->PulleyTab->Controls->Add(this->label6);
			this->PulleyTab->Controls->Add(this->num4Mass2);
			this->PulleyTab->Controls->Add(this->lbl4Acc);
			this->PulleyTab->Controls->Add(this->label28);
			this->PulleyTab->Controls->Add(this->lbl4Tension);
			this->PulleyTab->Controls->Add(this->label32);
			this->PulleyTab->Controls->Add(this->label33);
			this->PulleyTab->Controls->Add(this->num4Mass1);
			this->PulleyTab->Location = System::Drawing::Point(4, 27);
			this->PulleyTab->Name = L"PulleyTab";
			this->PulleyTab->Size = System::Drawing::Size(524, 230);
			this->PulleyTab->TabIndex = 3;
			this->PulleyTab->Text = L"Ramp and Pulley";
			this->PulleyTab->Click += gcnew System::EventHandler(this, &Form1::PulleyTab_Click);
			// 
			// label57
			// 
			this->label57->AutoSize = true;
			this->label57->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label57->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label57->Location = System::Drawing::Point(6, 168);
			this->label57->Name = L"label57";
			this->label57->Size = System::Drawing::Size(167, 20);
			this->label57->TabIndex = 37;
			this->label57->Text = L"Calculated Tension:";
			// 
			// textBox6
			// 
			this->textBox6->Location = System::Drawing::Point(216, 168);
			this->textBox6->Name = L"textBox6";
			this->textBox6->Size = System::Drawing::Size(130, 21);
			this->textBox6->TabIndex = 36;
			// 
			// label54
			// 
			this->label54->AutoSize = true;
			this->label54->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label54->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label54->Location = System::Drawing::Point(6, 138);
			this->label54->Name = L"label54";
			this->label54->Size = System::Drawing::Size(204, 20);
			this->label54->TabIndex = 35;
			this->label54->Text = L"Calculated Acceleration:";
			// 
			// textBox5
			// 
			this->textBox5->Location = System::Drawing::Point(216, 138);
			this->textBox5->Name = L"textBox5";
			this->textBox5->Size = System::Drawing::Size(130, 21);
			this->textBox5->TabIndex = 34;
			// 
			// label21
			// 
			this->label21->AutoSize = true;
			this->label21->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label21->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label21->Location = System::Drawing::Point(3, 75);
			this->label21->Name = L"label21";
			this->label21->Size = System::Drawing::Size(60, 20);
			this->label21->TabIndex = 33;
			this->label21->Text = L"Angle:";
			// 
			// num4Angle
			// 
			this->num4Angle->DecimalPlaces = 3;
			this->num4Angle->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num4Angle->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 131072});
			this->num4Angle->Location = System::Drawing::Point(133, 73);
			this->num4Angle->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {90, 0, 0, 0});
			this->num4Angle->Name = L"num4Angle";
			this->num4Angle->Size = System::Drawing::Size(120, 26);
			this->num4Angle->TabIndex = 32;
			this->num4Angle->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {30, 0, 0, 0});
			// 
			// button5
			// 
			this->button5->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button5->Location = System::Drawing::Point(352, 138);
			this->button5->Name = L"button5";
			this->button5->Size = System::Drawing::Size(165, 51);
			this->button5->TabIndex = 31;
			this->button5->Text = L"Run Simulation";
			this->button5->UseVisualStyleBackColor = true;
			this->button5->Click += gcnew System::EventHandler(this, &Form1::button5_Click);
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label2->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label2->Location = System::Drawing::Point(3, 107);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(119, 20);
			this->label2->TabIndex = 29;
			this->label2->Text = L"Coeff of Fric.:";
			// 
			// num4COF
			// 
			this->num4COF->DecimalPlaces = 3;
			this->num4COF->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num4COF->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 131072});
			this->num4COF->Location = System::Drawing::Point(133, 105);
			this->num4COF->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {2, 0, 0, 0});
			this->num4COF->Name = L"num4COF";
			this->num4COF->Size = System::Drawing::Size(120, 26);
			this->num4COF->TabIndex = 28;
			this->num4COF->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			// 
			// label6
			// 
			this->label6->AutoSize = true;
			this->label6->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label6->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label6->Location = System::Drawing::Point(3, 42);
			this->label6->Name = L"label6";
			this->label6->Size = System::Drawing::Size(133, 20);
			this->label6->TabIndex = 27;
			this->label6->Text = L"Hanging Mass: ";
			// 
			// num4Mass2
			// 
			this->num4Mass2->DecimalPlaces = 3;
			this->num4Mass2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num4Mass2->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num4Mass2->Location = System::Drawing::Point(133, 40);
			this->num4Mass2->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 131072});
			this->num4Mass2->Name = L"num4Mass2";
			this->num4Mass2->Size = System::Drawing::Size(120, 26);
			this->num4Mass2->TabIndex = 26;
			this->num4Mass2->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {10, 0, 0, 0});
			// 
			// lbl4Acc
			// 
			this->lbl4Acc->AutoSize = true;
			this->lbl4Acc->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl4Acc->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl4Acc->Location = System::Drawing::Point(370, 17);
			this->lbl4Acc->Name = L"lbl4Acc";
			this->lbl4Acc->Size = System::Drawing::Size(0, 20);
			this->lbl4Acc->TabIndex = 23;
			// 
			// label28
			// 
			this->label28->AutoSize = true;
			this->label28->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label28->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label28->Location = System::Drawing::Point(259, 17);
			this->label28->Name = L"label28";
			this->label28->Size = System::Drawing::Size(119, 20);
			this->label28->TabIndex = 22;
			this->label28->Text = L"Acceleration: ";
			// 
			// lbl4Tension
			// 
			this->lbl4Tension->AutoSize = true;
			this->lbl4Tension->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl4Tension->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl4Tension->Location = System::Drawing::Point(369, 42);
			this->lbl4Tension->Name = L"lbl4Tension";
			this->lbl4Tension->Size = System::Drawing::Size(0, 20);
			this->lbl4Tension->TabIndex = 21;
			// 
			// label32
			// 
			this->label32->AutoSize = true;
			this->label32->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label32->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label32->Location = System::Drawing::Point(259, 42);
			this->label32->Name = L"label32";
			this->label32->Size = System::Drawing::Size(82, 20);
			this->label32->TabIndex = 20;
			this->label32->Text = L"Tension: ";
			// 
			// label33
			// 
			this->label33->AutoSize = true;
			this->label33->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label33->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label33->Location = System::Drawing::Point(3, 13);
			this->label33->Name = L"label33";
			this->label33->Size = System::Drawing::Size(129, 20);
			this->label33->TabIndex = 19;
			this->label33->Text = L"Surface Mass: ";
			// 
			// num4Mass1
			// 
			this->num4Mass1->DecimalPlaces = 3;
			this->num4Mass1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num4Mass1->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num4Mass1->Location = System::Drawing::Point(133, 11);
			this->num4Mass1->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 131072});
			this->num4Mass1->Name = L"num4Mass1";
			this->num4Mass1->Size = System::Drawing::Size(120, 26);
			this->num4Mass1->TabIndex = 18;
			this->num4Mass1->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 0});
			// 
			// SpringTab
			// 
			this->SpringTab->BackColor = System::Drawing::Color::DarkCyan;
			this->SpringTab->Controls->Add(this->label60);
			this->SpringTab->Controls->Add(this->textBox9);
			this->SpringTab->Controls->Add(this->label59);
			this->SpringTab->Controls->Add(this->textBox8);
			this->SpringTab->Controls->Add(this->label58);
			this->SpringTab->Controls->Add(this->textBox7);
			this->SpringTab->Controls->Add(this->lbl5X);
			this->SpringTab->Controls->Add(this->label40);
			this->SpringTab->Controls->Add(this->label24);
			this->SpringTab->Controls->Add(this->num5Compress);
			this->SpringTab->Controls->Add(this->button8);
			this->SpringTab->Controls->Add(this->label26);
			this->SpringTab->Controls->Add(this->num5COF);
			this->SpringTab->Controls->Add(this->label31);
			this->SpringTab->Controls->Add(this->num5K);
			this->SpringTab->Controls->Add(this->lbl5V);
			this->SpringTab->Controls->Add(this->label35);
			this->SpringTab->Controls->Add(this->lbl5T);
			this->SpringTab->Controls->Add(this->label37);
			this->SpringTab->Controls->Add(this->label38);
			this->SpringTab->Controls->Add(this->num5Mass);
			this->SpringTab->Location = System::Drawing::Point(4, 27);
			this->SpringTab->Name = L"SpringTab";
			this->SpringTab->Size = System::Drawing::Size(524, 230);
			this->SpringTab->TabIndex = 4;
			this->SpringTab->Text = L"Spring Launch";
			// 
			// label60
			// 
			this->label60->AutoSize = true;
			this->label60->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label60->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label60->Location = System::Drawing::Point(12, 204);
			this->label60->Name = L"label60";
			this->label60->Size = System::Drawing::Size(219, 20);
			this->label60->TabIndex = 54;
			this->label60->Text = L"Calculated Final Distance:";
			// 
			// textBox9
			// 
			this->textBox9->Location = System::Drawing::Point(234, 204);
			this->textBox9->Name = L"textBox9";
			this->textBox9->Size = System::Drawing::Size(130, 21);
			this->textBox9->TabIndex = 53;
			// 
			// label59
			// 
			this->label59->AutoSize = true;
			this->label59->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label59->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label59->Location = System::Drawing::Point(12, 173);
			this->label59->Name = L"label59";
			this->label59->Size = System::Drawing::Size(186, 20);
			this->label59->TabIndex = 52;
			this->label59->Text = L"Calculated Final Time:";
			// 
			// textBox8
			// 
			this->textBox8->Location = System::Drawing::Point(234, 172);
			this->textBox8->Name = L"textBox8";
			this->textBox8->Size = System::Drawing::Size(130, 21);
			this->textBox8->TabIndex = 51;
			// 
			// label58
			// 
			this->label58->AutoSize = true;
			this->label58->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label58->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label58->Location = System::Drawing::Point(12, 143);
			this->label58->Name = L"label58";
			this->label58->Size = System::Drawing::Size(216, 20);
			this->label58->TabIndex = 50;
			this->label58->Text = L"Calculated Initial Velocity:";
			// 
			// textBox7
			// 
			this->textBox7->Location = System::Drawing::Point(234, 143);
			this->textBox7->Name = L"textBox7";
			this->textBox7->Size = System::Drawing::Size(130, 21);
			this->textBox7->TabIndex = 49;
			// 
			// lbl5X
			// 
			this->lbl5X->AutoSize = true;
			this->lbl5X->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl5X->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl5X->Location = System::Drawing::Point(384, 69);
			this->lbl5X->Name = L"lbl5X";
			this->lbl5X->Size = System::Drawing::Size(0, 20);
			this->lbl5X->TabIndex = 48;
			// 
			// label40
			// 
			this->label40->AutoSize = true;
			this->label40->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label40->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label40->Location = System::Drawing::Point(274, 69);
			this->label40->Name = L"label40";
			this->label40->Size = System::Drawing::Size(100, 20);
			this->label40->TabIndex = 47;
			this->label40->Text = L"Final Dist.: ";
			// 
			// label24
			// 
			this->label24->AutoSize = true;
			this->label24->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label24->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label24->Location = System::Drawing::Point(18, 71);
			this->label24->Name = L"label24";
			this->label24->Size = System::Drawing::Size(131, 20);
			this->label24->TabIndex = 46;
			this->label24->Text = L"Compress Dist:";
			// 
			// num5Compress
			// 
			this->num5Compress->DecimalPlaces = 3;
			this->num5Compress->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num5Compress->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 131072});
			this->num5Compress->Location = System::Drawing::Point(148, 69);
			this->num5Compress->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {15, 0, 0, 0});
			this->num5Compress->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num5Compress->Name = L"num5Compress";
			this->num5Compress->Size = System::Drawing::Size(120, 26);
			this->num5Compress->TabIndex = 45;
			this->num5Compress->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {10, 0, 0, 0});
			// 
			// button8
			// 
			this->button8->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button8->Location = System::Drawing::Point(370, 173);
			this->button8->Name = L"button8";
			this->button8->Size = System::Drawing::Size(147, 52);
			this->button8->TabIndex = 44;
			this->button8->Text = L"Run Simulation";
			this->button8->UseVisualStyleBackColor = true;
			this->button8->Click += gcnew System::EventHandler(this, &Form1::button8_Click);
			// 
			// label26
			// 
			this->label26->AutoSize = true;
			this->label26->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label26->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label26->Location = System::Drawing::Point(18, 103);
			this->label26->Name = L"label26";
			this->label26->Size = System::Drawing::Size(119, 20);
			this->label26->TabIndex = 43;
			this->label26->Text = L"Coeff of Fric.:";
			// 
			// num5COF
			// 
			this->num5COF->DecimalPlaces = 3;
			this->num5COF->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num5COF->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 131072});
			this->num5COF->Location = System::Drawing::Point(148, 101);
			this->num5COF->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {2, 0, 0, 0});
			this->num5COF->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 131072});
			this->num5COF->Name = L"num5COF";
			this->num5COF->Size = System::Drawing::Size(120, 26);
			this->num5COF->TabIndex = 42;
			this->num5COF->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {2, 0, 0, 65536});
			// 
			// label31
			// 
			this->label31->AutoSize = true;
			this->label31->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label31->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label31->Location = System::Drawing::Point(18, 38);
			this->label31->Name = L"label31";
			this->label31->Size = System::Drawing::Size(128, 20);
			this->label31->TabIndex = 41;
			this->label31->Text = L"Spring Const.: ";
			// 
			// num5K
			// 
			this->num5K->DecimalPlaces = 3;
			this->num5K->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num5K->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num5K->Location = System::Drawing::Point(148, 36);
			this->num5K->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {50, 0, 0, 0});
			this->num5K->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num5K->Name = L"num5K";
			this->num5K->Size = System::Drawing::Size(120, 26);
			this->num5K->TabIndex = 40;
			this->num5K->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {10, 0, 0, 0});
			// 
			// lbl5V
			// 
			this->lbl5V->AutoSize = true;
			this->lbl5V->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl5V->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl5V->Location = System::Drawing::Point(385, 13);
			this->lbl5V->Name = L"lbl5V";
			this->lbl5V->Size = System::Drawing::Size(0, 20);
			this->lbl5V->TabIndex = 39;
			// 
			// label35
			// 
			this->label35->AutoSize = true;
			this->label35->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label35->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label35->Location = System::Drawing::Point(274, 13);
			this->label35->Name = L"label35";
			this->label35->Size = System::Drawing::Size(99, 20);
			this->label35->TabIndex = 38;
			this->label35->Text = L"Initial Vel.: ";
			// 
			// lbl5T
			// 
			this->lbl5T->AutoSize = true;
			this->lbl5T->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl5T->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl5T->Location = System::Drawing::Point(384, 38);
			this->lbl5T->Name = L"lbl5T";
			this->lbl5T->Size = System::Drawing::Size(0, 20);
			this->lbl5T->TabIndex = 37;
			// 
			// label37
			// 
			this->label37->AutoSize = true;
			this->label37->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label37->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label37->Location = System::Drawing::Point(274, 38);
			this->label37->Name = L"label37";
			this->label37->Size = System::Drawing::Size(101, 20);
			this->label37->TabIndex = 36;
			this->label37->Text = L"Final Time: ";
			// 
			// label38
			// 
			this->label38->AutoSize = true;
			this->label38->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label38->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label38->Location = System::Drawing::Point(18, 13);
			this->label38->Name = L"label38";
			this->label38->Size = System::Drawing::Size(61, 20);
			this->label38->TabIndex = 35;
			this->label38->Text = L"Mass: ";
			// 
			// num5Mass
			// 
			this->num5Mass->DecimalPlaces = 3;
			this->num5Mass->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num5Mass->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num5Mass->Location = System::Drawing::Point(148, 7);
			this->num5Mass->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {3, 0, 0, 65536});
			this->num5Mass->Name = L"num5Mass";
			this->num5Mass->Size = System::Drawing::Size(120, 26);
			this->num5Mass->TabIndex = 34;
			this->num5Mass->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {5, 0, 0, 0});
			// 
			// RaceTab
			// 
			this->RaceTab->BackColor = System::Drawing::Color::DarkCyan;
			this->RaceTab->Controls->Add(this->label61);
			this->RaceTab->Controls->Add(this->textBox10);
			this->RaceTab->Controls->Add(this->lbl6FinishT2);
			this->RaceTab->Controls->Add(this->lbl6FinishT1);
			this->RaceTab->Controls->Add(this->label55);
			this->RaceTab->Controls->Add(this->label56);
			this->RaceTab->Controls->Add(this->lbl6Winner);
			this->RaceTab->Controls->Add(this->lbl6MaxV2);
			this->RaceTab->Controls->Add(this->lbl6MaxV1);
			this->RaceTab->Controls->Add(this->label50);
			this->RaceTab->Controls->Add(this->label51);
			this->RaceTab->Controls->Add(this->label52);
			this->RaceTab->Controls->Add(this->button12);
			this->RaceTab->Controls->Add(this->label36);
			this->RaceTab->Controls->Add(this->label39);
			this->RaceTab->Controls->Add(this->label44);
			this->RaceTab->Controls->Add(this->label45);
			this->RaceTab->Controls->Add(this->label46);
			this->RaceTab->Controls->Add(this->label47);
			this->RaceTab->Controls->Add(this->num6COF2);
			this->RaceTab->Controls->Add(this->num6COF1);
			this->RaceTab->Controls->Add(this->num6Mass2);
			this->RaceTab->Controls->Add(this->num6Mass1);
			this->RaceTab->Location = System::Drawing::Point(4, 27);
			this->RaceTab->Name = L"RaceTab";
			this->RaceTab->Size = System::Drawing::Size(524, 230);
			this->RaceTab->TabIndex = 5;
			this->RaceTab->Text = L"Race";
			// 
			// label61
			// 
			this->label61->AutoSize = true;
			this->label61->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label61->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label61->Location = System::Drawing::Point(31, 171);
			this->label61->Name = L"label61";
			this->label61->Size = System::Drawing::Size(175, 20);
			this->label61->TabIndex = 52;
			this->label61->Text = L"Calculated WINNER:";
			// 
			// textBox10
			// 
			this->textBox10->Location = System::Drawing::Point(205, 171);
			this->textBox10->Name = L"textBox10";
			this->textBox10->Size = System::Drawing::Size(130, 21);
			this->textBox10->TabIndex = 51;
			// 
			// lbl6FinishT2
			// 
			this->lbl6FinishT2->AutoSize = true;
			this->lbl6FinishT2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl6FinishT2->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl6FinishT2->Location = System::Drawing::Point(367, 115);
			this->lbl6FinishT2->Name = L"lbl6FinishT2";
			this->lbl6FinishT2->Size = System::Drawing::Size(0, 20);
			this->lbl6FinishT2->TabIndex = 39;
			// 
			// lbl6FinishT1
			// 
			this->lbl6FinishT1->AutoSize = true;
			this->lbl6FinishT1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl6FinishT1->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl6FinishT1->Location = System::Drawing::Point(144, 115);
			this->lbl6FinishT1->Name = L"lbl6FinishT1";
			this->lbl6FinishT1->Size = System::Drawing::Size(0, 20);
			this->lbl6FinishT1->TabIndex = 38;
			// 
			// label55
			// 
			this->label55->AutoSize = true;
			this->label55->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label55->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label55->Location = System::Drawing::Point(256, 115);
			this->label55->Name = L"label55";
			this->label55->Size = System::Drawing::Size(105, 20);
			this->label55->TabIndex = 37;
			this->label55->Text = L"Finish Time:";
			// 
			// label56
			// 
			this->label56->AutoSize = true;
			this->label56->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label56->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label56->Location = System::Drawing::Point(32, 115);
			this->label56->Name = L"label56";
			this->label56->Size = System::Drawing::Size(105, 20);
			this->label56->TabIndex = 36;
			this->label56->Text = L"Finish Time:";
			// 
			// lbl6Winner
			// 
			this->lbl6Winner->AutoSize = true;
			this->lbl6Winner->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl6Winner->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl6Winner->Location = System::Drawing::Point(108, 151);
			this->lbl6Winner->Name = L"lbl6Winner";
			this->lbl6Winner->Size = System::Drawing::Size(0, 20);
			this->lbl6Winner->TabIndex = 35;
			// 
			// lbl6MaxV2
			// 
			this->lbl6MaxV2->AutoSize = true;
			this->lbl6MaxV2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl6MaxV2->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl6MaxV2->Location = System::Drawing::Point(367, 95);
			this->lbl6MaxV2->Name = L"lbl6MaxV2";
			this->lbl6MaxV2->Size = System::Drawing::Size(0, 20);
			this->lbl6MaxV2->TabIndex = 34;
			// 
			// lbl6MaxV1
			// 
			this->lbl6MaxV1->AutoSize = true;
			this->lbl6MaxV1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->lbl6MaxV1->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->lbl6MaxV1->Location = System::Drawing::Point(144, 95);
			this->lbl6MaxV1->Name = L"lbl6MaxV1";
			this->lbl6MaxV1->Size = System::Drawing::Size(0, 20);
			this->lbl6MaxV1->TabIndex = 33;
			// 
			// label50
			// 
			this->label50->AutoSize = true;
			this->label50->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label50->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label50->Location = System::Drawing::Point(31, 151);
			this->label50->Name = L"label50";
			this->label50->Size = System::Drawing::Size(70, 20);
			this->label50->TabIndex = 32;
			this->label50->Text = L"Winner:";
			// 
			// label51
			// 
			this->label51->AutoSize = true;
			this->label51->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label51->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label51->Location = System::Drawing::Point(256, 95);
			this->label51->Name = L"label51";
			this->label51->Size = System::Drawing::Size(77, 20);
			this->label51->TabIndex = 31;
			this->label51->Text = L"Max Vel:";
			// 
			// label52
			// 
			this->label52->AutoSize = true;
			this->label52->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label52->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label52->Location = System::Drawing::Point(32, 95);
			this->label52->Name = L"label52";
			this->label52->Size = System::Drawing::Size(77, 20);
			this->label52->TabIndex = 30;
			this->label52->Text = L"Max Vel:";
			// 
			// button12
			// 
			this->button12->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->button12->Location = System::Drawing::Point(346, 165);
			this->button12->Name = L"button12";
			this->button12->Size = System::Drawing::Size(175, 33);
			this->button12->TabIndex = 29;
			this->button12->Text = L"Run Simulation";
			this->button12->UseVisualStyleBackColor = true;
			this->button12->Click += gcnew System::EventHandler(this, &Form1::button12_Click);
			// 
			// label36
			// 
			this->label36->AutoSize = true;
			this->label36->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->label36->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label36->Location = System::Drawing::Point(256, 13);
			this->label36->Name = L"label36";
			this->label36->Size = System::Drawing::Size(120, 24);
			this->label36->TabIndex = 28;
			this->label36->Text = L"Second Car";
			// 
			// label39
			// 
			this->label39->AutoSize = true;
			this->label39->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->label39->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label39->Location = System::Drawing::Point(31, 13);
			this->label39->Name = L"label39";
			this->label39->Size = System::Drawing::Size(88, 24);
			this->label39->TabIndex = 27;
			this->label39->Text = L"First Car";
			// 
			// label44
			// 
			this->label44->AutoSize = true;
			this->label44->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label44->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label44->Location = System::Drawing::Point(32, 66);
			this->label44->Name = L"label44";
			this->label44->Size = System::Drawing::Size(74, 20);
			this->label44->TabIndex = 26;
			this->label44->Text = L"Friction:";
			// 
			// label45
			// 
			this->label45->AutoSize = true;
			this->label45->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label45->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label45->Location = System::Drawing::Point(256, 66);
			this->label45->Name = L"label45";
			this->label45->Size = System::Drawing::Size(74, 20);
			this->label45->TabIndex = 25;
			this->label45->Text = L"Friction:";
			// 
			// label46
			// 
			this->label46->AutoSize = true;
			this->label46->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label46->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label46->Location = System::Drawing::Point(256, 39);
			this->label46->Name = L"label46";
			this->label46->Size = System::Drawing::Size(56, 20);
			this->label46->TabIndex = 24;
			this->label46->Text = L"Mass:";
			// 
			// label47
			// 
			this->label47->AutoSize = true;
			this->label47->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label47->ForeColor = System::Drawing::SystemColors::ControlLightLight;
			this->label47->Location = System::Drawing::Point(32, 37);
			this->label47->Name = L"label47";
			this->label47->Size = System::Drawing::Size(56, 20);
			this->label47->TabIndex = 23;
			this->label47->Text = L"Mass:";
			// 
			// num6COF2
			// 
			this->num6COF2->DecimalPlaces = 3;
			this->num6COF2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num6COF2->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 131072});
			this->num6COF2->Location = System::Drawing::Point(339, 66);
			this->num6COF2->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {3, 0, 0, 65536});
			this->num6COF2->Name = L"num6COF2";
			this->num6COF2->Size = System::Drawing::Size(120, 26);
			this->num6COF2->TabIndex = 22;
			this->num6COF2->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {15, 0, 0, 131072});
			// 
			// num6COF1
			// 
			this->num6COF1->DecimalPlaces = 3;
			this->num6COF1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num6COF1->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 131072});
			this->num6COF1->Location = System::Drawing::Point(112, 66);
			this->num6COF1->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {3, 0, 0, 65536});
			this->num6COF1->Name = L"num6COF1";
			this->num6COF1->Size = System::Drawing::Size(120, 26);
			this->num6COF1->TabIndex = 21;
			this->num6COF1->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {13, 0, 0, 131072});
			// 
			// num6Mass2
			// 
			this->num6Mass2->DecimalPlaces = 3;
			this->num6Mass2->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num6Mass2->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num6Mass2->Location = System::Drawing::Point(339, 37);
			this->num6Mass2->Name = L"num6Mass2";
			this->num6Mass2->Size = System::Drawing::Size(120, 26);
			this->num6Mass2->TabIndex = 20;
			this->num6Mass2->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {3, 0, 0, 0});
			// 
			// num6Mass1
			// 
			this->num6Mass1->DecimalPlaces = 3;
			this->num6Mass1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->num6Mass1->Increment = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 65536});
			this->num6Mass1->Location = System::Drawing::Point(112, 37);
			this->num6Mass1->Name = L"num6Mass1";
			this->num6Mass1->Size = System::Drawing::Size(120, 26);
			this->num6Mass1->TabIndex = 19;
			this->num6Mass1->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {25, 0, 0, 65536});
			// 
			// timer2
			// 
			this->timer2->Enabled = true;
			this->timer2->Interval = 1;
			this->timer2->Tick += gcnew System::EventHandler(this, &Form1::timer2_Tick);
			// 
			// openFileDialog1
			// 
			this->openFileDialog1->FileName = L"openFileDialog1";
			// 
			// richTextBox1
			// 
			this->richTextBox1->BackColor = System::Drawing::Color::LightBlue;
			this->richTextBox1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 14.25F, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->richTextBox1->Location = System::Drawing::Point(3, 42);
			this->richTextBox1->Name = L"richTextBox1";
			this->richTextBox1->Size = System::Drawing::Size(523, 267);
			this->richTextBox1->TabIndex = 0;
			this->richTextBox1->Text = L"Results For Simulations Are Listed Below Simulation Results Label";
			this->richTextBox1->Visible = false;
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 18, static_cast<System::Drawing::FontStyle>((System::Drawing::FontStyle::Bold | System::Drawing::FontStyle::Underline)), 
				System::Drawing::GraphicsUnit::Point, static_cast<System::Byte>(0)));
			this->label1->Location = System::Drawing::Point(3, 10);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(237, 29);
			this->label1->TabIndex = 1;
			this->label1->Text = L"Simulation Results:";
			// 
			// ResultsPanel
			// 
			this->ResultsPanel->BackColor = System::Drawing::Color::LightBlue;
			this->ResultsPanel->Controls->Add(this->label1);
			this->ResultsPanel->Controls->Add(this->richTextBox1);
			this->ResultsPanel->Enabled = false;
			this->ResultsPanel->Location = System::Drawing::Point(1023, 601);
			this->ResultsPanel->Name = L"ResultsPanel";
			this->ResultsPanel->Size = System::Drawing::Size(229, 114);
			this->ResultsPanel->TabIndex = 1;
			this->ResultsPanel->Visible = false;
			// 
			// label5
			// 
			this->label5->AutoSize = true;
			this->label5->BackColor = System::Drawing::Color::White;
			this->label5->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 36, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->label5->ForeColor = System::Drawing::SystemColors::HotTrack;
			this->label5->Location = System::Drawing::Point(546, 79);
			this->label5->Name = L"label5";
			this->label5->Size = System::Drawing::Size(478, 55);
			this->label5->TabIndex = 4;
			this->label5->Text = L"Physics Simulator EZ";
			// 
			// Form1
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->AutoSize = true;
			this->BackColor = System::Drawing::Color::Black;
			this->ClientSize = System::Drawing::Size(1266, 722);
			this->Controls->Add(this->label5);
			this->Controls->Add(this->SimulationTabs);
			this->Controls->Add(this->AssignmentPanel);
			this->Controls->Add(this->ResultsPanel);
			this->Controls->Add(this->menuStrip1);
			this->MainMenuStrip = this->menuStrip1;
			this->Name = L"Form1";
			this->StartPosition = System::Windows::Forms::FormStartPosition::Manual;
			this->Text = L"Physics Simulator EZ - Please Login...";
			this->MouseClick += gcnew System::Windows::Forms::MouseEventHandler(this, &Form1::Form1_MouseClick);
			this->menuStrip1->ResumeLayout(false);
			this->menuStrip1->PerformLayout();
			this->AssignmentPanel->ResumeLayout(false);
			this->AssignmentPanel->PerformLayout();
			this->panel1->ResumeLayout(false);
			this->panel1->PerformLayout();
			this->SimulationTabs->ResumeLayout(false);
			this->BallTab->ResumeLayout(false);
			this->BallTab->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num1COR))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num1Velocity))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->BHeight))->EndInit();
			this->CollisionTab->ResumeLayout(false);
			this->CollisionTab->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num2Dist))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num2Vel2))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num2Vel1))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num2Mass2))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num2Mass1))->EndInit();
			this->ThrowTab->ResumeLayout(false);
			this->ThrowTab->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num3Angle))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num3Velocity))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num3Height))->EndInit();
			this->PulleyTab->ResumeLayout(false);
			this->PulleyTab->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num4Angle))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num4COF))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num4Mass2))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num4Mass1))->EndInit();
			this->SpringTab->ResumeLayout(false);
			this->SpringTab->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num5Compress))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num5COF))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num5K))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num5Mass))->EndInit();
			this->RaceTab->ResumeLayout(false);
			this->RaceTab->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num6COF2))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num6COF1))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num6Mass2))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->num6Mass1))->EndInit();
			this->ResultsPanel->ResumeLayout(false);
			this->ResultsPanel->PerformLayout();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	private: System::Void timer1_Tick(System::Object^  sender, System::EventArgs^  e)
			 {
				 if(continueSimulation == false)
				 {
					timer1->Enabled = false;
					Start = false;
					MessageBox::Show("Simulation Has Ended... Please Review Results.."); //Tim: Removed. The box appears and everything stops moving so it is obvious it is done
					continueSimulation = true;
					//SimulationTabs->Location = Point(720,27);
					//SimulationTabs->Location = Point(720,27);
					SimulationTabs->Enabled = true;
					SimulationTabs->Visible = true;
					if(showAssignments == true)
					{
						AssignmentPanel->Enabled=true;
						AssignmentPanel->Visible=true;
					}
					else
					{
						AssignmentPanel->Enabled = false;
						AssignmentPanel->Visible = false;
					}
				 }
					
				 else
				 {
					UNREFERENCED_PARAMETER(sender);
					UNREFERENCED_PARAMETER(e);
					   //OpenGL->Render();                   //  take out and replace with below!!!!!!!!!!!!!!!!!!!!
					//   OpenGL->SwapOpenGLBuffers(); // please make sure it works before we take stuff out...
					//OpenGL->simRender[tabindex]();
					switch(selectedSim)
					{
					case 1: OpenGL->sim1();
						break;
					case 2: OpenGL->sim2();
						break;
					case 3: OpenGL->sim3();
						break;
					case 4: OpenGL->sim4();
						break;
					case 5: OpenGL->sim5();
						break;
					case 6: OpenGL->sim6();
						break;
					default:
						MessageBox::Show("Pick A Simulation");
						break;
					};
				 }
				 
				
			 }
	private: System::Void newSimulationToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
				 //SimulationTabs->Location = Point(720,27);
				 SimulationTabs->Visible = true;
				 ResultsPanel->Enabled=false;
				 ResultsPanel->Visible=false;
				 AssignmentPanel->Enabled=false;
				 AssignmentPanel->Visible=false;
			 }
private: System::Void showAssignmentsToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 timer1->Enabled = false;
			
			 if(isloggedin)
			 { 
				 showAssignments = true;
				// SimulationTabs->Location = Point(720,27);
				 SimulationTabs->Enabled = true;
				 SimulationTabs->Visible = true;
				 ResultsPanel->Enabled=false;
				 ResultsPanel->Visible=false;
				 //AssignmentPanel->Location = Point(719,406);
				 AssignmentPanel->Enabled=true;
				 AssignmentPanel->Visible=true;

			 }// end if isloggedin
			 else
				 MessageBox::Show("Please Login First To View Assignments");

			 list<string> Mylist;
			 Mylist.push_front("Assignment 1");
		 }
private: System::Void BbalRunSimBtn_Click(System::Object^  sender, System::EventArgs^  e) {
			 //SimulationTabs->Location=Point(1300,27);
			 SimulationTabs->Visible = false;
			 AssignmentPanel->Location=Point(1300,27);
			 ResultsPanel->Location=Point(1300,27);
			 AssignmentPanel->Enabled=false;
			 AssignmentPanel->Visible=false;
			 //ResultsPanel->Enabled = true;
			 //ResultsPanel->Visible = true;
			 timer1->Enabled = true;
		 }
private: System::Void assignmentsToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void AssignmentComboBox_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) 
		 {
			 
			//Clicked on a combobox text.. now need to find the proper assignment and display its contests.
			// Converting managed to unmanaged to search Mylist...
			 string SelectedText = "Test";
			 String^ SelectedItem = AssignmentComboBox->Text;
			 MarshalString(SelectedItem, SelectedText);
			 //Search List For Given assignment.
			 String^ sm = gcnew String(SelectedText.c_str());
			 AssignmentTextBox->Text = sm;
			

			 for(list<TempObject>::iterator iterator = Mylist->begin(); iterator != Mylist->end(); ++iterator)
			{
				if(iterator->getName() == SelectedText)
				{
					string Descr = iterator->getDescription();
					String^ TempDesc = gcnew String(Descr.c_str());
					AssignmentTextBox->Text = TempDesc;		
				}
			}
		 }

private: System::Void timer2_Tick(System::Object^  sender, System::EventArgs^  e) {

		 }
private: System::Void closeToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 this->Close();
		 }
private: System::Void loginToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e)  {
				 //Display The Login Window...
			  
			 if(isloggedin)
				 MessageBox::Show("Already Logged In");
			 try
			 {
				while (isloggedin == false)
				{
					  timer1->Enabled = false;
					  this->Enabled = false;  
					 
					  login->ShowDialog();
					   if(login->isCanceled())
					  {
						  login->setCanceled(false);
						  this->Enabled = true;
						  return;
					  }
					  this->Enabled = true;
					  std::string userId = "Test";
					  std::string password = "Test";
					  String^ userIdManaged = login->GetUserName();
					  String^ passwordManaged = login->GetPassword();
					  MarshalString(userIdManaged/*managed*/, userId/*unmanaged*/);
					  MarshalString(passwordManaged/*managed*/, password/*unmanaged*/);
					
					  int usertype =checkLogin(userId,password);
					  if ( usertype == 0 || usertype == 1)
					  {
						  isloggedin = true;
						  LoggedInUser = userId;
						  MessageBox::Show("Login succesfull");
						  std::string tempText = "Physics Simulator EZ - Welcome: " + LoggedInUser;
						  String^ FormText = gcnew String(tempText.c_str());
						  this->Text = FormText;

						   
						 ///ifteacher is true  disable create assignments
						  submitSimulationToolStripMenuItem->Enabled = true;
						  submitSimulationToolStripMenuItem->Enabled = true;
						  //Set up the 3d simulations
						  if(selectedSim ==-1 || selectedSim == 0 || selectedSim == 1)
								selectSim1ToolStripMenuItem_Click(sender, e);
							else if(selectedSim == 2)
								selectSim2ToolStripMenuItem_Click(sender, e);
							else if(selectedSim == 3)
								throwingSimToolStripMenuItem_Click(sender, e);
							else if(selectedSim == 4)
								pullySimToolStripMenuItem_Click(sender, e);
							else if(selectedSim == 5)
								springLaunchToolStripMenuItem_Click(sender, e);

						  if(usertype==0)
						  {
								createAssignmentToolStripMenuItem->Enabled = true;
								createAssignmentToolStripMenuItem->Visible = true;
								AssignmentTextBox->Enabled = true;
								editAssignmentTitle->Visible = true;
								button7->Visible = true;

								addStudentMenu->Enabled = true;
								addStudentMenu->Visible = true;
								//addTeacherToolStripMenuItem->Enabled = true;
								//addTeacherToolStripMenuItem->Visible = true;
								button10_Click(sender, e);
						  }
						  if(usertype==1)
						  {
								submitSimulationToolStripMenuItem->Enabled = true;
								submitSimulationToolStripMenuItem->Enabled = true;
								//Label41->Visible = false;
								editAssignmentTitle->Visible = false;
								label41->Visible = false;
								button6->Visible = false;
								button4->Visible = false;
								AssignmentTextBox->Location = Point(4,46);
								AssignmentTextBox->Height = 195;
								AssignmentPanel->Width = 528;
								AssignmentTextBox->Enabled = true;
								AssignmentTextBox->ReadOnly = true;
								
						  }
							//ns2__getAssignmentsResponse Assignments;
							Assignments = getAssignmentStuff(LoggedInUser);
							std::string Descrip;
							std::string AssignmentInformation;
							//Put in coder here to populate the assignments field.
						
							for(int i = 0; i < Assignments.result->__size; i++)
							{
								//result.result->__ptr[i]->description;
								Descrip = Assignments.result->__ptr[i]->description;
								AssignmentInformation =  Assignments.result->__ptr[i]->instructions;
								Mylist->push_back(TempObject(Descrip, AssignmentInformation));
							}
						//Now Populate the Assignment Combo Box with the proper Fields.
							for(list<TempObject>::iterator iterator = Mylist->begin(); iterator != Mylist->end(); ++iterator)
							{
								string temp = iterator->getName();
								String^ sm = gcnew String(temp.c_str());
								AssignmentComboBox->Items->Add(sm);
							}
							

					  }
					  else
						  MessageBox::Show("Login Failed... Please Try Again");

				 }// End WHile Loop
			 }//End Try Block
			 catch(...)
			 {
				 MessageBox::Show("Error Connecting To Database");
			 }
		 }

private: System::Void createAssignmentToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
						
			 if(isloggedin)
			 { 
				
					timer1->Enabled = false;
					//createAssignmentForm->ShowDialog();
					Aform->ShowDialog();
					if(Aform->getIsCancelled() == false)
					{
						ResultsPanel->Visible = false;
						string aName = "Test";
						string aInstructions = "Test";
						String^ faName = Aform->getAssignmentName();
						String^ faInstructions = Aform->getOutPut();
					//	//Marshal Strings Here...
						MarshalString(faName/*managed*/, aName/*unmanaged*/);
						MarshalString(faInstructions/*managed*/, aInstructions/*unmanaged*/);
						int aValue = Aform->getAssignmentNumber();
						string goodCall = createAssignment(LoggedInUser, aName, aInstructions, aValue); 
						if(goodCall == "success")
						{
							MessageBox::Show("Assignment Created...");
							Aform->setIsCancelled(false);
						}
						else if(goodCall != "success")
						{
							MessageBox::Show("Error Communicating With Server");
						}

					}
					//if(createAssignmentForm->isCanceled() == false)
					//{
					//	ResultsPanel->Visible=false;
					//	string aName = "Test";
					//	string aInstructions = "Test";

					//	String^ faName = createAssignmentForm->GetaName();
					//	String^ faInstructions = createAssignmentForm->GetaInstructions();
					//	//Marshal Strings Here...
					//	MarshalString(faName/*managed*/, aName/*unmanaged*/);
					//	MarshalString(faInstructions/*managed*/, aInstructions/*unmanaged*/);
					//	//Now Used Normal strings to create assignment.
					//	int aValue = createAssignmentForm->getAssignmentNumber();
					//	string goodCall = createAssignment(LoggedInUser, aName, aInstructions, aValue); 
					//	//if(createAssignment(LoggedInUser, aName, aInstructions, aValue) == "success") // should be "success" not "not implemented"
					//	if(goodCall == "success")
					//	{
					//		//clear out the fields here of the create assignment form.
					//		createAssignmentForm->clearFields();
					//		//createAssignmentForm->Close();

					//	}
					//	else if(goodCall != "success")
					//	{
					//		MessageBox::Show("Error Communicating With Server");
					//	}

					//}
					//else
					//{
					//	//this is if they canceled the create form...
					//	MessageBox::Show("Canceled Creating An Assignment...");
					//}
					button9_Click(sender,e);
			 }
			 else
				 MessageBox::Show("Teacher Must Be Logged Into System TO Create Assignments");
			 
		 }
private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
			 timer1->Enabled = false;
		 }
private: System::Void databaseSettingsToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 //Show Database form to insert the database URL for a connection....
			 timer1->Enabled = false;
			 dbURLForm->ShowDialog();
		 }
private: System::Void openSimulationToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 timer1->Enabled = false;
			 openFileDialog1->ShowDialog();
		 }
private: System::Void saveSimulationToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 timer1->Enabled = false;
			 saveFileDialog1->ShowDialog();
		 }
private: System::Void stopSimulationToolStripMenuItem1_Click(System::Object^  sender, System::EventArgs^  e) {
			 if(timer1->Enabled == true)
			 {
			 Start = false;
			 timer1->Enabled = false;
			 SimulationTabs->Visible = true;
			 //SimulationTabs->Location = Point(720,27);
			 //SimulationTabs->Location = Point(720,27);
			 SimulationTabs->Enabled = true;
			 SimulationTabs->Visible = true;
			  if(showAssignments == true)
				 {
					AssignmentPanel->Enabled=true;
					AssignmentPanel->Visible=true;
				 }
				 else
				 {
					 AssignmentPanel->Visible = false;
					 AssignmentPanel->Enabled = false;
				 }
			 
			 //ResultsPanel->Location = Point(723,403);
			 //ResultsPanel->Enabled = true;
			 //ResultsPanel->Visible = true;
			 }
			 else
				 MessageBox::Show("No Simulation Is Currently Running");
		 }
private: System::Void editToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void restartSimulationToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			  /*if( SimulationTabs->SelectedIndex == 0)
				 selectedSim = 1;
			  if( SimulationTabs->SelectedIndex == 1)
				 selectedSim = 2;
			   if( SimulationTabs->SelectedIndex == 2)
				 selectedSim = 3;*/
			 selectedSim = SimulationTabs->SelectedIndex + 1; // this does what the above, commented out block does
			 if (!SimulationTabs->Visible && Start == false)
				 selectedSim = 0;
			 if (isAssignment)
			 {
//				if((float)guessValueBox->Value == (float)0.000)
//				{
//					MessageBox::Show("You Must Enter A Guess Before Running Simulation!");
//					return;
//				}
			 }
			 if(timer1->Enabled == false && selectedSim != 0)
			 {
				 Start = true;
				 switch ( selectedSim )
				 {
					case 1:
						OpenGL->sim1Init((float)BHeight->Value, (float)num1Velocity->Value, (float)num1COR->Value);
						writeResults1();
						break;
					case 2:
						OpenGL->sim2Init((float)num2Mass1->Value, (float)num2Vel1->Value, (float)num2Mass2->Value, (float)num2Vel2->Value, (float)num2Dist->Value);
						writeResults2();
						break;
					case 3:
						OpenGL->sim3Init((float)num3Height->Value, (float)num3Velocity->Value, (float)num3Angle->Value);
						writeResults3();
						break;
					case 4:
						OpenGL->sim4Init((float)num4Mass1->Value, (float)num4Mass2->Value, (float)num4Angle->Value, (float)num4COF->Value);
						writeResults4();
						break;
					case 5:
						OpenGL->sim5Init((float)num5Mass->Value, (float)num5K->Value, (float)num5Compress->Value, (float)num5COF->Value);
						writeResults5();
						break;
					case 6:
						OpenGL->sim6Init((float)num6Mass1->Value, (float)num6Mass2->Value, (float)num6COF1->Value, (float)num6COF2->Value);
						writeResults6();
						break;
					case 7:
						OpenGL->sim7Init();
						//writeResults7();
						break;
				 };
				ResultsPanel->Visible = false;
				//ResultsPanel->Location = Point(1300,403);
				//AssignmentPanel->Location = Point(1300,406);
				AssignmentPanel->Visible = false;
				//SimulationTabs->Location = Point(1300,27);
				SimulationTabs->Visible = false;
				timer1->Enabled = true;
			 }
			 else if(selectedSim == 0)
				 MessageBox::Show("Must Select Simulation Before Running");
			 else
				  MessageBox::Show("Must Stop Simulation First");
		 }

private: System::Void Form1_MouseClick(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) {
			 timer1->Enabled = false;
		 }
private: System::Void selectSim1ToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 continueSimulation = true;
			 if(timer1->Enabled == false)
			 {
				 selectedSim = 1;
				 SimulationTabs->Width = 532;
				 SimulationTabs->Height = 178;
				// OpenGL->Sim1(); // replace these with some kind of SetSim(int i) function
				 
				 OpenGL->sim1Init((float)BHeight->Value, (float)num1Velocity->Value, (float)num1COR->Value);
				 //SimulationTabs->Location = Point(720,27);
				 SimulationTabs->SelectedIndex = 0;
				 SimulationTabs->Visible = true;
				 //hideAllTabs();
				 //BallTab->Visible = true;
				 ResultsPanel->Enabled=false;
				 ResultsPanel->Visible=false;
				 if(showAssignments == true)
				 {
					AssignmentPanel->Enabled=true;
					AssignmentPanel->Visible=true;
				 }
				 else
				 {
					 AssignmentPanel->Visible = false;
					 AssignmentPanel->Enabled = false;
				 }
				 label5->Visible = false;
				 OpenGL->sim1Init((float)BHeight->Value, (float)num1Velocity->Value, (float)num1COR->Value);
				 OpenGL->sim1();
			 }
			 else
				  MessageBox::Show("Must Stop Simulation First");
		 }
private: System::Void selectSim2ToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 continueSimulation = true;
			 if(timer1->Enabled == false)
			 {
				selectedSim = 2;
				SimulationTabs->Width = 532;
				 SimulationTabs->Height = 292;
				 //OpenGL->Sim2(); // replace these with some kind of SetSim(int i) function
				 OpenGL->sim2Init((float)num2Mass1->Value, (float)num2Vel1->Value, (float)num2Mass2->Value, (float)num2Vel2->Value, (float)num2Dist->Value);
				// SimulationTabs->Location = Point(720,27);
				 SimulationTabs->SelectedIndex = 1;
				 SimulationTabs->Visible = true;
				 SimulationTabs->Enabled = true;
				 //hideAllTabs();
				 //SimulationTabs->tabPages[1] // can be accessed while running the code, but gives compile errors if I try to add code that accesses it. Different than SimulationTabs->TabPages
				 ResultsPanel->Enabled=false;
				 ResultsPanel->Visible=false;
				 if(showAssignments == true)
				 {
					AssignmentPanel->Enabled=true;
					AssignmentPanel->Visible=true;
				 }
				 else
				 {
					 AssignmentPanel->Visible = false;
					 AssignmentPanel->Enabled = false;
				 }
				 //hideAllTabs(); // no idea why, but when I use this, the bouncing ball Sim shows up first every time. Collision will show up after second time.
				 //CollisionTab->Enabled = true;
				 //CollisionTab->Visible = true;
				 label5->Visible = false;
				 OpenGL->sim2Init((float)num2Mass1->Value, (float)num2Vel1->Value, (float)num2Mass2->Value, (float)num2Vel2->Value, (float)num2Dist->Value);
				 OpenGL->sim2();
			 }
			 else
				  MessageBox::Show("Must Stop Simulation First");
		 }

private: System::Void resetSimulationToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 AssignmentPanel->Visible = false;
			 if(timer1->Enabled == false && selectedSim != 0)
			 {
			 continueSimulation = true;
//			 guessValueBox->Value = (Decimal)0.000;
			 if(timer1->Enabled == false)
			 {
				switch ( selectedSim )
				{
				case 1:
					OpenGL->sim1Init((float)BHeight->Value, (float)num1Velocity->Value, (float)num1COR->Value);
					BHeight->Enabled = true;
					break;
				case 2:
					OpenGL->sim2Init((float)num2Mass1->Value, (float)num2Vel1->Value, (float)num2Mass2->Value, (float)num2Vel2->Value, (float)num2Dist->Value);
					break;
				case 3:
					OpenGL->sim3Init((float)num3Height->Value, (float)num3Velocity->Value, (float)num3Angle->Value);
					break;
				case 4:
					OpenGL->sim4Init((float)num4Mass1->Value, (float)num4Mass2->Value, (float)num4Angle->Value, (float)num4COF->Value);
					break;
				case 5:
					OpenGL->sim5Init((float)num5Mass->Value, (float)num5K->Value, (float)num5Compress->Value, (float)num5COF->Value);
					break;
				case 6:
					OpenGL->sim6Init((float)num6Mass1->Value, (float)num6Mass2->Value, (float)num6COF1->Value, (float)num6COF2->Value);
					break;
				case 7:
					OpenGL->sim7Init();
					break;
				}
			}
				
			 else
				 MessageBox::Show("Must Stop Simulation First");
			 }
		 }

private: Void writeResults1() {
			float startY, startV, COR;
			float maxY, maxV, firstBounceY;
			startY = (float)BHeight->Value;
			startV = (float)num1Velocity->Value;
			COR = (float)num1COR->Value;
			//maxV = -(sqrt(2*g*startY) + abs(startV)); // if it has positive velocity, it will have the same velocity when it returns to the start height. Tim edit: No it doesn't. Bad assumption
			
			if (startV <= 0) {
				maxY = startY;
				maxV = -(sqrt(2*g*startY) + abs(startV));
			} else {
				maxY = 0.5f * pow(startV, 2) / g + startY;
				maxV = -(sqrt(2*g*maxY));
			}

			firstBounceY = 0.5f * pow(maxV * COR, 2) / g;  
			if (firstBounceY > maxY)
				maxY = firstBounceY;

			lbl1MaxV->Text = maxV.ToString();
			lbl1MaxY->Text = maxY.ToString();
			lbl1BounceY->Text = firstBounceY.ToString();
		 }
private: Void writeResults2() {
			float m1, m2, v1, v2, dist;
			float v1new, v2new, tCollision;
			m1 = (float)num2Mass1->Value;
			m2 = (float)num2Mass2->Value;
			v1 = (float)num2Vel1->Value;
			v2 = (float)num2Vel2->Value;
			dist = (float)num2Dist->Value;

			v1new = (m1-m2)/(m1+m2) * v1 + (2*m2)/(m1 + m2) * v2;
			v2new = (m2-m1)/(m1+m2) * v2 + (2*m1)/(m1 + m2) * v1;
			tCollision = dist / (abs(v1) + abs(v2));

			lbl2FinalV1->Text = v1new.ToString();
			lbl2FinalV2->Text = v2new.ToString();
			lbl2CollTime->Text = tCollision.ToString();
		 }
private: Void writeResults3() {
			float vX, vY, startY;
			float maxY, maxT, maxX, maxT1, maxT2;
			startY = (float)num3Height->Value;
			vX = (float)num3Velocity->Value * cos((float)num3Angle->Value*PI/180);
			vY = (float)num3Velocity->Value * sin((float)num3Angle->Value*PI/180);
			 
			maxY = 0.5f * pow(vY, 2) / g + startY;
			maxT1 = (-vY + sqrt(pow(vY, 2) + 2 * g * startY))/(-g);
			maxT2 = (-vY - sqrt(pow(vY, 2) + 2 * g * startY))/(-g);
			if (maxT1 > maxT2)
				maxT = maxT1; 
			else 
				maxT = maxT2;

			maxX = vX * maxT;

			lbl3MaxY->Text = maxY.ToString();
			lbl3MaxT->Text = maxT.ToString();
			lbl3MaxX->Text = maxX.ToString();
		 }
private: Void writeResults4() {
			float m1, m2, COF, angle;
			float Fgrav1, Fgrav2, Ffric, acc, tension;

			m1 = (float)num4Mass1->Value;
			m2 = (float)num4Mass2->Value;
			COF = (float)num4COF->Value;
			angle = (float)num4Angle->Value*PI/180; // doing the conversion here so I don't need to do it everywhere else

			Fgrav1 = m1 * g * sin(angle);
			Fgrav2 = -m2 * g;
			Ffric = COF * m1 * g * cos(angle);
			if (abs(Fgrav1) > abs(Fgrav2)) //friction opposes direction of motion. If Fgrav1 is larger, Ffric must be negative to oppose it.
				Ffric = -Ffric;
			
			// F = m*a so a = F/m
			acc = (Fgrav1 + Fgrav2 + Ffric) / (m1 + m2);

			//check if it is going same direction as friction. If that is the case, the system is actually in equilibrium (0 acceleration)
			if (acc * Ffric > 0 && (float)num4Angle->Value != 90) // Tim: If angle is 90, Ffric should be 0 so we don't need to look at it. Acceleration will not be 0
				acc = 0;

			tension = m2 * acc - Fgrav2;

			lbl4Acc->Text = acc.ToString();
			lbl4Tension->Text = tension.ToString();
		 }
/*private: Void hideAllTabs() {
			 BallTab->Visible = false;
			 CollisionTab->Visible = false;
		 private: System::Void button12_Click(System::Object^  sender, System::EventArgs^  e) {
				  }
}*/
private: System::Void BHeight_ValueChanged(System::Object^  sender, System::EventArgs^  e) {
			  label5->Visible = false;
			  OpenGL->sim1Init((float)BHeight->Value, (float)num1Velocity->Value, (float)num1COR->Value);
		 }
private: System::Void numericUpDown1_ValueChanged(System::Object^  sender, System::EventArgs^  e) {
////			 if( (float)guessValueBox->Value != 0.000)
//			 {
//				 BHeight->Enabled = true;
//				 continueSimulation = true;
//			 }
//			 else
//				 BHeight->Enabled = false;
		 }

private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
			 //if( SimulationTabs->SelectedIndex == 1)
				// selectedSim = 1;
			 restartSimulationToolStripMenuItem_Click(sender, e);
		 }
private: System::Void submitSimulationToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 if(isloggedin)
			 {
				 // Get the Id Number of Simulation Selected...
				 int AssignId = 0;
				 std::string SubmitString;
				 timer1->Enabled = false;
				 //getAssignment ID if selected
				 string SelectedAssignment = "Test";
				 String^ SelectedItem = AssignmentComboBox->Text;
				MarshalString(SelectedItem, SelectedAssignment); 
				int AssignmentIdNumber = -1;
				for(int i = 0; i < Assignments.result->__size; i++)
				{
					//result.result->__ptr[i]->description;
					string Descrip = Assignments.result->__ptr[i]->description;
					if(Descrip == SelectedAssignment)
					{
						AssignmentIdNumber = Assignments.result->__ptr[i]->assignmentId;
					}
					
				}
				
				 int Sim;
				 if(selectedSim == 0)
				 {
					 MessageBox::Show("No Simulation Selected To Submit...");
				 }
				 else if (selectedSim == 1)
				 {
					 std::string unManagedResults = "";
					 String ^ManagedResults = lbl1MaxY->Text;
					 MarshalString(ManagedResults,unManagedResults);
					//if(lbl1MaxY->Text == "Results")
					if(unManagedResults == "")
					{
						MessageBox::Show("Must Run Simulation Before Submitting Assignment");
						return;
					}
					if(textBox1->Text == "")
					{
						MessageBox::Show("Must Insert Max Velocity Calculation!");
						return;
					}

					submit->ShowDialog();
					if(submit->getCanceled() == false && AssignmentIdNumber !=-1)
					{
					float coefficient = (float)num1COR->Value;
					float height = (float)BHeight->Value;
					float vel =  (float)num1Velocity->Value;

					std::string unManagedHeight = "";
					String ^ManagedHeight = height.ToString();
					std::string unManagedCoef = "";
					String ^ManagedCoef = coefficient.ToString();
					std::string unManagedVel = "";
					String ^ManagedVel = vel.ToString();
					
					MarshalString(ManagedHeight, unManagedHeight);
					MarshalString(ManagedCoef, unManagedCoef);
					MarshalString(ManagedVel, unManagedVel);

					
					SubmitString ="Boucing Ball Simulation:\n";
					SubmitString += "----------------------------\n";
					SubmitString += "Input Values:\n   Height: ";
					SubmitString = SubmitString + unManagedHeight;
					//SubmitString += height.ToString();
					SubmitString += "\n   Velocity: ";
					SubmitString += unManagedVel;
					SubmitString += "\n   Coefficient Of Restitution: ";
					SubmitString += unManagedCoef;
					SubmitString += "\n\nOUTPUT:";

					std::string unManagedMaxHeight = "";
					String ^ManagedMaxHeight = lbl1MaxY->Text;
					std::string unManagedMaxVel = "";
					String ^ ManagedMaxVel = lbl1MaxV->Text;
					std::string unManagedBounceY = "";
					String ^ManagedBounceY = lbl1BounceY->Text;

					MarshalString(ManagedMaxHeight, unManagedMaxHeight);
					MarshalString(ManagedMaxVel, unManagedMaxVel);
					MarshalString(ManagedBounceY, unManagedBounceY);

					std::string unManagedCalculationVelcity = "";
					String  ^ManagedCalculationVelocity = textBox1->Text;
					MarshalString(ManagedCalculationVelocity, unManagedCalculationVelcity);

					SubmitString += "\n   Max Height: " + unManagedMaxHeight;
					SubmitString += "\n   Max Velocity: " + unManagedMaxVel;
					SubmitString += "\n   1st Bounce Height: "+ unManagedBounceY;
					SubmitString += "\n   Student Calculated Velocity: " +unManagedCalculationVelcity;

					std::string ReturnResult=subBallBounceAssignment(selectedSim, AssignmentIdNumber,LoggedInUser, SubmitString);
						if( ReturnResult == "success")
						{
							MessageBox::Show("Simulation Submitted...");
							return;
						} // end if it was NOT canceld
						else
						{
							MessageBox::Show("Something Went Wrong, Simulation Not Submitted");
						}
					}

					else
					{
 						MessageBox::Show("Canceld Simulation Submition... No Assignment Selected, Or User Canceled..");
						submit->setCanceled(false);
					}
				 }//SUEDO CODE
				 else if(selectedSim==2)
				 {
					if(lbl2FinalV1->Text == "")
					{
						MessageBox::Show("Must Run Simulation Before Submitting Assignment");
						return;
					}
					 if(textBox2->Text == "" || textBox3->Text == "")
					{
						MessageBox::Show("Must Insert Max Velocity Calculations For LEFT and RIGHT Cars!");
						return;
					}
					 //Add Code Here for Collisoin Simulation.
					 submit->ShowDialog();
					if(submit->getCanceled() == false && AssignmentIdNumber !=-1)
					{
					float LeftMass = (float)num2Mass1->Value;
					float RightMass = (float)num2Mass2->Value;
					float LeftVel =  (float)num2Vel1->Value;
					float RightVel = (float)num2Vel2->Value;
					float Distance = (float)num2Dist->Value;

					std::string unManagedLeftMass = "";
					std::string unManagedRightMass = "";
					String ^ManagedLeftMass = LeftMass.ToString();
					String ^ManagedRightMass = RightMass.ToString();

					std::string unManagedLeftVel ="";
					std::string unManagedRightVel="";
					String ^ManagedLeftVel = LeftVel.ToString();
					String ^ManagedRightVel = RightVel.ToString();

					std::string unManagedDistance = "";
					String ^ManagedDistance = Distance.ToString();
					
					MarshalString(ManagedLeftMass, unManagedLeftMass);
					MarshalString(ManagedRightMass, unManagedRightMass);

					MarshalString(ManagedLeftVel, unManagedLeftVel);
					MarshalString(ManagedRightVel, unManagedRightVel);

					MarshalString(ManagedDistance, unManagedDistance);

					
					SubmitString ="Collision Simulation:\n";
					SubmitString += "------------------------\n";
					SubmitString += "Input Values:\n";
					SubmitString +="	Left Mass: " + unManagedLeftMass +"\n"; 
					SubmitString +="	Right Mass: "+unManagedRightMass +"\n";
					SubmitString +="	Left Velocity: "+unManagedLeftVel+"\n";
					SubmitString +="	Right Velocity: "+unManagedRightVel+"\n";
					SubmitString +="	Distance Apart: "+unManagedDistance+"\n\n";

					//Unmanage the Results Labels Now...

					MarshalString(lbl2FinalV1->Text, unManagedLeftVel);
					MarshalString(lbl2FinalV2->Text, unManagedRightVel);
					std::string colTime = "";
					MarshalString(lbl2CollTime->Text, colTime);

					SubmitString += "Result Values:\n";
					SubmitString += "	Final Left Vel: "+unManagedLeftVel+"\n";
					SubmitString += "Final Right Vel: " +unManagedRightVel+"\n";
					SubmitString += "	Collision Time: "+colTime;
					
					std::string ReturnResult=subBallBounceAssignment(selectedSim, AssignmentIdNumber,LoggedInUser,SubmitString);
						if( ReturnResult == "success")
						{
							MessageBox::Show("Simulation Submitted...");
							return;
						} // end if it was NOT canceld
						else
						{
							MessageBox::Show("Something Went Wrong, Simulation Not Submitted");
						}
					}

					else
					{
 						MessageBox::Show("Canceld Simulation Submition... No Assignment Selected, Or User Canceled..");
						submit->setCanceled(false);
					}
				 }//End Else if for second Simulations.
				 else if(selectedSim == 3)
				 {
					if(lbl3MaxY->Text == "")
					{
						MessageBox::Show("Must Run Simulation Before Submitting Assignment");
						return;
					}
					 if(textBox4->Text == "")
					 {
						 MessageBox::Show("Must Insert A Calculation For Distance Traveled!");
						 return;
					 }
					 //Add Code Here for Projectile.
					 submit->ShowDialog();
					if(submit->getCanceled() == false && AssignmentIdNumber !=-1)
					{
					float inputHeight = (float)num3Height->Value;
					float inputVelocity = (float)num3Velocity->Value;
					float inputAngle =  (float)num3Angle->Value;
					
					//Convert Input
					std::string unManagedInputHeight = "";
					std::string unManagedInputVelocity = "";
					std::string unManagedInputAngle = "";
					String ^ManagedInputHeight = inputHeight.ToString();
					String ^ManagedInputVelocity = inputVelocity.ToString();
					String ^ManagedInputAngle = inputAngle.ToString();
					MarshalString(ManagedInputHeight, unManagedInputHeight);
					MarshalString(ManagedInputVelocity, unManagedInputVelocity);
					MarshalString(ManagedInputAngle, unManagedInputAngle);

					//Convert Ouput
					std::string unManagedMaxHeight = "";
					std::string unManagedTime = "";
					std::string unManagedDistance ="";
					String ^ManagedMaxHeight = lbl3MaxY->Text;
					String ^ManagedTime = lbl3MaxT->Text;
					String ^ManagedDistance = lbl3MaxX->Text;
					MarshalString(ManagedMaxHeight, unManagedMaxHeight);
					MarshalString(ManagedTime, unManagedTime);
					MarshalString(ManagedDistance, unManagedDistance);

					std::string unManagedStudentDistance = "";
					String ^ManagedStudentDistance = textBox4->Text;
					MarshalString(ManagedStudentDistance, unManagedStudentDistance);


					
					SubmitString ="Projectile Simulation:\n";
					SubmitString += "--------------------------\n";
					SubmitString += "Input Values:\n";
					SubmitString +="	Starting Height: " + unManagedInputHeight +"\n"; 
					SubmitString +="	Starting Velocity: "+unManagedInputVelocity +"\n";
					SubmitString +="	Starting Angle: "+unManagedInputAngle+"\n\n";
					SubmitString += "Result Values:\n";
					SubmitString += "	Max Height: "+unManagedMaxHeight+"\n";
					SubmitString += "	Time In Air: "+unManagedTime+"\n";
					SubmitString +="	Distance Covered: "+unManagedDistance + "\n";
					SubmitString +="	Student Calculated Distance Covered: " +unManagedStudentDistance; 
					
					std::string ReturnResult=subBallBounceAssignment(selectedSim, AssignmentIdNumber,LoggedInUser,SubmitString);
						if( ReturnResult == "success")
						{
							MessageBox::Show("Simulation Submitted...");
							return;
						} // end if it was NOT canceld
						else
						{
							MessageBox::Show("Something Went Wrong, Simulation Not Submitted");
						}
					}

					else
					{
 						MessageBox::Show("Canceld Simulation Submition... No Assignment Selected, Or User Canceled..");
						submit->setCanceled(false);
					}

				 }//End of Projectile Submit Simulations..
				 else if(selectedSim==4)
				 {
					if(lbl4Acc->Text == "")
					{
						MessageBox::Show("Must Run Simulation Before Submitting Assignment");
						return;
					}
					 if(textBox5->Text == ""||textBox6->Text == "")
					 {
						 MessageBox::Show("Must Insert A Calculation For Acceleration And Tension!");
						 return;
					 }
					submit->ShowDialog();
					if(submit->getCanceled() == false && AssignmentIdNumber !=-1)
					{
					float inputSurfaceMass = (float)num4Mass1->Value;
					float inputHangingMass = (float)num4Mass2->Value;
					float inputAngle =  (float)num4Angle->Value;
					float inputCOF = (float)num4COF->Value;
					
					//Convert Input
					std::string unManagedSurfaceMass = "";
					std::string unManagedHangingMass = "";
					std::string unManagedInputAngle = "";
					std::string unManagedCOFF="";
					String ^ManagedSurfaceMass = inputSurfaceMass.ToString();
					String ^ManagedHangingMass = inputHangingMass.ToString();
					String ^ManagedInputAngle = inputAngle.ToString();
					String ^ManagedInputCoff = inputCOF.ToString();
					MarshalString(ManagedSurfaceMass, unManagedSurfaceMass);
					MarshalString(ManagedHangingMass, unManagedHangingMass);
					MarshalString(ManagedInputAngle, unManagedInputAngle);
					MarshalString(ManagedInputCoff, unManagedCOFF);
					//Convert Ouput
					std::string unManagedAcceleration = "";
					std::string unManagedTension = "";
					String ^ManagedAcceleration = lbl4Acc->Text;
					String ^ManagedTension = lbl4Tension->Text;
					
					MarshalString(ManagedAcceleration, unManagedAcceleration);
					MarshalString(ManagedTension, unManagedTension);
					
					SubmitString =	"Pully Simulation:\n";
					SubmitString += "--------------------\n";
					SubmitString += "Input Values:\n";
					SubmitString +="	Surface Mass: " + unManagedSurfaceMass +"\n"; 
					SubmitString +="	Hanging Mass: "+unManagedHangingMass +"\n";
					SubmitString +="	Starting Angle: "+unManagedInputAngle+"\n\n";
					SubmitString += "Result Values:\n";
					SubmitString += "	Acceleration: "+unManagedAcceleration+"\n";
					SubmitString += "	Tension: "+unManagedTension+"\n";

					std::string unManagedStudentAcceleration = "";
					std::string unManagedStudentTension = "";
					String ^ManagedStudentAcceleration = textBox5->Text;
					String ^ManagedStudentTension = textBox6->Text;
					MarshalString(ManagedStudentAcceleration,unManagedStudentAcceleration);
					MarshalString(ManagedStudentTension, unManagedStudentTension);

					SubmitString +="	Student Calculated Acceleration: " +unManagedStudentAcceleration + "\n";
					SubmitString +="	Stduent Calculated Tension: " +unManagedStudentTension;
					
					std::string ReturnResult=subBallBounceAssignment(selectedSim, AssignmentIdNumber,LoggedInUser,SubmitString);
						if( ReturnResult == "success")
						{
							MessageBox::Show("Simulation Submitted...");
							return;
						} // end if it was NOT canceld
						else
						{
							MessageBox::Show("Something Went Wrong, Simulation Not Submitted");
						}
					}

					else
					{
 						MessageBox::Show("Canceld Simulation Submition... No Assignment Selected, Or User Canceled..");
						submit->setCanceled(false);
					}
				 }//End of The pully sim submissiondSim
				 else if(selectedSim == 5)
				 {
					 if(lbl5V->Text == "")
					{
						MessageBox::Show("Must Run Simulation Before Submitting Assignment");
						return;
					}
					 if(textBox7->Text == "" || textBox8->Text == "" || textBox9->Text == "")
					 {
						 MessageBox::Show("Must Insert A Calculation for Velocity, Time, or Distance!");
						 return;
					 }
					  	 //Add Code Here for Pully Simulation.
					submit->ShowDialog();
					if(submit->getCanceled() == false && AssignmentIdNumber !=-1)
					{
					float inputMass = (float)num5Mass->Value;
					float inputKValue = (float)num5K->Value;
					float inputCompressionDistance =  (float)num5Compress->Value;
					float inputCOF = (float)num5COF->Value;
					
					//Convert Input
					std::string unManagedMass = "";
					std::string unManagedKValue = "";
					std::string unManagedCompressionDistance = "";
					std::string unManagedCOFF="";
					String ^ManagedMass = inputMass.ToString();
					String ^ManagedKValue = inputKValue.ToString();
					String ^ManagedCompressionDistance = inputCompressionDistance.ToString();
					String ^ManagedInputCoff = inputCOF.ToString();
					MarshalString(ManagedMass, unManagedMass);
					MarshalString(ManagedKValue, unManagedKValue);
					MarshalString(ManagedCompressionDistance, unManagedCompressionDistance);
					MarshalString(ManagedInputCoff, unManagedCOFF);

					std::string unManagedStudVel = "";
					std::string unManagedStudTime = "";
					std::string unManagedStudDist="";
					String ^ManagedStudVel = textBox7->Text;
					String ^ManagedStudTime = textBox8->Text;
					String ^ManagedStudDist = textBox9->Text;
					MarshalString(ManagedStudVel, unManagedStudVel);
					MarshalString(ManagedStudTime, unManagedStudTime);
					MarshalString(ManagedStudDist, unManagedStudDist);
					//Convert Ouput
					std::string unManagedInitialVelocity = "";
					std::string unManagedFinalTime = "";
					std::string unManagedFinalDistance="";
					String ^ManagedInitialVelocity = lbl5V->Text;
					String ^ManagedFinalTime = lbl5T->Text;
					String ^ManagedFinalDistance = lbl5X->Text;
					
					MarshalString(ManagedInitialVelocity, unManagedInitialVelocity);
					MarshalString(ManagedFinalTime, unManagedFinalTime);
					MarshalString(ManagedFinalDistance, unManagedFinalDistance);
					
					SubmitString ="Spring Simulation:\n";
					SubmitString += "--------------------\n";
					SubmitString += "Input Values:\n";
					SubmitString +="	Mass: " + unManagedMass +"\n"; 
					SubmitString +="	Spring Constant (K-Value): "+unManagedKValue +"\n";
					SubmitString +="	Spring Compression Distance: "+unManagedCompressionDistance+"\n";
					SubmitString +="	Coefficient of Friction: " + unManagedCOFF +"\n\n";
					SubmitString += "Result Values:\n";
					SubmitString += "	Initial Velocity: "+unManagedInitialVelocity+"\n";
					SubmitString += "	Time Moving: "+unManagedFinalTime+"\n";
					SubmitString +="	Final Distance: "+unManagedFinalDistance + "\n";
					SubmitString +="	Student Calculated Velocity: "+unManagedStudVel +"\n";
					SubmitString +="	Student Calculated Time: "+unManagedStudTime +"\n";
					SubmitString +="	Student Calculated Distance: "+unManagedStudDist +"\n";

					
					std::string ReturnResult=subBallBounceAssignment(selectedSim, AssignmentIdNumber,LoggedInUser,SubmitString);
						if( ReturnResult == "success")
						{
							MessageBox::Show("Simulation Submitted...");
							return;
						} // end if it was NOT canceld
						else
						{
							MessageBox::Show("Something Went Wrong, Simulation Not Submitted");
						}
					}

					else
					{
 						MessageBox::Show("Canceld Simulation Submition... No Assignment Selected, Or User Canceled..");
						submit->setCanceled(false);
					}
				 }//End Spring Simulation Submission
				/*
				if(no assignment selected)
				{
					MessageBox::Show("No Assignment Selected To Submit")
				}
				*/

				 //Show The Dialog Box and then do the database stuff to submit the assignment here.
				 else if(selectedSim == 6)
				 {
					if(lbl6MaxV1->Text == "")
					{
						MessageBox::Show("Must Run Simulation Before Submitting Assignment");
						return;
					}
					 if(textBox10->Text =="")
					 {
						 MessageBox::Show("Must Insert Calculated Winner!");
						 return;
					 }
					submit->ShowDialog();
					if(submit->getCanceled() == false && AssignmentIdNumber !=-1)
					{
					float inputMass1 = (float)num6Mass1->Value;
					float inputMass2 = (float)num6Mass2->Value;
					float inputCOF1 = (float)num6COF1->Value;
					float inputCOF2 = (float)num6COF2->Value;
					
					//Convert Input
					std::string unManagedFirstMass = "";
					std::string unManagedSecondMass = "";
					std::string unManagedCOF1 = "";
					std::string unManagedCOF2="";
					String ^ManagedFirstMass = inputMass1.ToString();
					String ^ManagedSecondMass = inputMass2.ToString();
					String ^ManagedCOF1 = inputCOF1.ToString();
					String ^ManagedCOF2 = inputCOF2.ToString();
				
					MarshalString(ManagedFirstMass, unManagedFirstMass);
					MarshalString(ManagedSecondMass, unManagedSecondMass);
					MarshalString(ManagedCOF1, unManagedCOF1);
					MarshalString(ManagedCOF2, unManagedCOF2);

					std::string unManagedWinner = "";
					std::string unManagedStudentWinner = "";
		
					String ^ManagedStudentWinner = textBox10->Text;
					MarshalString(ManagedStudentWinner, unManagedStudentWinner);

					//Convert Ouput
					std::string unManagedMaxVel1 = "";
					std::string unManagedMaxVel2 = "";
					std::string unManagedFirstCarTime = "";
					std::string unManagedSecondCarTime = "";
			
					
					String ^ManagedMaxVel1 = lbl6MaxV1->Text;
					String ^ManagedMaxVel2 = lbl6MaxV2->Text;
					String ^ManagedWinner = lbl6Winner->Text;
					
					MarshalString(ManagedMaxVel1, unManagedMaxVel1);
					MarshalString(ManagedMaxVel2, unManagedMaxVel2);
					MarshalString(ManagedWinner, unManagedWinner);
					
					SubmitString ="Race Car Simulation:\n";
					SubmitString += "------------------------\n";
					SubmitString += "Input Values:\n";
					SubmitString +="	First Car Mass: " + unManagedFirstMass +"\n"; 
					SubmitString +="	Second Car Mass: " + unManagedSecondMass +"\n";
					SubmitString +="	First Car Friction: "+unManagedCOF1 +"\n";
					SubmitString +="	Second Car Friction: "+unManagedCOF2 +"\n";

					SubmitString += "Result Values:\n";
					SubmitString += "	First Car Max Velocity: "+unManagedMaxVel1+"\n";
					SubmitString += "	Second Car Max Velocity: "+unManagedMaxVel2+"\n";
					SubmitString += "	WINNER: "+unManagedWinner+"\n";
					SubmitString += "	Student Calculated Winner: " +unManagedStudentWinner;

					
					std::string ReturnResult=subBallBounceAssignment(selectedSim, AssignmentIdNumber,LoggedInUser,SubmitString);
						if( ReturnResult == "success")
						{
							MessageBox::Show("Simulation Submitted...");
							return;
						} // end if it was NOT canceld
						else
						{
							MessageBox::Show("Something Went Wrong, Simulation Not Submitted");
						}
					}

					else
					{
 						MessageBox::Show("Canceld Simulation Submition... No Assignment Selected, Or User Canceled..");
						submit->setCanceled(false);
					}
				 }//End Spring Simulation Submission
				 
			 }

			 else
			 {
				 MessageBox::Show("Must Be Logged In To Submit Assignments...");
			 }
		 }
private: System::Void throwingSimToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 continueSimulation = true;
			 if(timer1->Enabled == false)
			 {
				 selectedSim = 3;
				 SimulationTabs->Width = 532;
				 SimulationTabs->Height = 159;
				 OpenGL->sim3Init((float)num3Height->Value, (float)num3Velocity->Value, (float)num3Angle->Value);
				 //SimulationTabs->Location = Point(720,27);
				 SimulationTabs->SelectedIndex = 2;
				 SimulationTabs->Visible = true;
				 ResultsPanel->Enabled=false;
				 ResultsPanel->Visible=false;
				 if(showAssignments == true)
				 {
					AssignmentPanel->Enabled=true;
					AssignmentPanel->Visible=true;
				 }
				 else
				 {
					 AssignmentPanel->Visible = false;
					 AssignmentPanel->Enabled = false;
				 }
				 label5->Visible = false;
				 OpenGL->sim3Init((float)num3Height->Value, (float)num3Velocity->Value, (float)num3Angle->Value);
				 OpenGL->sim3();
			 }
			 else
				  MessageBox::Show("Must Stop Simulation First");
		 }
private: System::Void button2_Click_1(System::Object^  sender, System::EventArgs^  e) {
			  //if( SimulationTabs->SelectedIndex == 2)
				// selectedSim = 2;
			 restartSimulationToolStripMenuItem_Click(sender, e);
		 }
private: System::Void button3_Click(System::Object^  sender, System::EventArgs^  e) {
			  /*if( SimulationTabs->SelectedIndex == 0)
				 selectedSim = 0;*/
			 restartSimulationToolStripMenuItem_Click(sender, e);		 
		 }
private: System::Void searchDirectoryToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 Help->ShowDialog();
		 }
private: System::Void pullySimToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 continueSimulation = true;
			 if(timer1->Enabled == false)
			 {
				 selectedSim = 4;
				 SimulationTabs->Width = 532;
				 SimulationTabs->Height = 226;
				 //SimulationTabs->Location = Point(720,27);
				 SimulationTabs->SelectedIndex = 3;
				 SimulationTabs->Visible = true;
				 ResultsPanel->Enabled=false;
				 ResultsPanel->Visible=false;
				 if(showAssignments == true)
				 {
					AssignmentPanel->Enabled=true;
					AssignmentPanel->Visible=true;
				 }
				 else
				 {
					 AssignmentPanel->Visible = false;
					 AssignmentPanel->Enabled = false;
				 }
				 label5->Visible = false;
				 OpenGL->sim4Init((float)num4Mass1->Value, (float)num4Mass2->Value, (float)num4Angle->Value, (float)num4COF->Value);
				 OpenGL->sim4();
			 }
			 else
				  MessageBox::Show("Must Stop Simulation First");

		 }
private: System::Void button5_Click(System::Object^  sender, System::EventArgs^  e) {
			  //if( SimulationTabs->SelectedIndex == 3)
				// selectedSim = 3;
			 restartSimulationToolStripMenuItem_Click(sender, e);
		 }
private: System::Void button4_Click(System::Object^  sender, System::EventArgs^  e) {
			//Check to see if you really want to delete the assignment...
			delRequest->ShowDialog();
			if(delRequest->getDeleteRequest())
			{
				ns1__Assignment AssignmentToDelete = ns1__Assignment(); // assignment to delete.
				//Find Assingment to Delete that matches description given
				String ^ManagedDescription = AssignmentComboBox->Text;
				string unmanagedDescription;
				MarshalString(ManagedDescription, unmanagedDescription);
				int i = 0;
				for(i=0; i < Assignments.result->__size; i++)
					{
						//result.result->__ptr[i]->description;
						string Descrip = Assignments.result->__ptr[i]->description;
						if(unmanagedDescription == Descrip)
						{
						
								AssignmentToDelete.description=Assignments.result->__ptr[i]->description ;	
								AssignmentToDelete.instructions=Assignments.result->__ptr[i]->instructions;	
								AssignmentToDelete.number=Assignments.result->__ptr[i]->number;	
								AssignmentToDelete.assignmentId=Assignments.result->__ptr[i]->assignmentId;	
								AssignmentToDelete.submitted=Assignments.result->__ptr[i]->submitted;	
								AssignmentToDelete.soap=Assignments.result->__ptr[i]->soap;	
								break;
						}		
					}
				 ns1__Assignment aDelete = (ns1__Assignment)*Assignments.result->__ptr[i];
				 string Result = deleteCreatedAssignment(LoggedInUser,aDelete);
				 button9_Click(sender,e);
				 delRequest->setDeleteRequest(false);
			}
			else
				delRequest->setDeleteRequest(false);
		 }
private: System::Void button6_Click(System::Object^  sender, System::EventArgs^  e) {
			 //Add code here to get the student assignments... first with hard coded student...
			 std::string unManagedStudentName;
			 String ^ManagedStudentName = StudentNameTextBox->Text;
			 MarshalString(ManagedStudentName, unManagedStudentName);
			 ns2__getStudentsSimulationsResponse submittedStuff;
			 submittedStuff = getStudSimulations(LoggedInUser,unManagedStudentName);
			 //Get the Information out of it here...
			
			 StudentAssignmentsComboBox->Items->Clear();
			 StudentAssignmentsComboBox->Text = "";
			 StudentAssignmentDescriptionsBox->Text = "";
			 MySubList = new list<TempObject>();
			 MySubList->clear();
			 for(int i = 0; i < submittedStuff.result->__size; i++)
			{
				std::string TempSubName = submittedStuff.result->__ptr[i]->text_USCORE3;
				std::string TempSubOutPut = submittedStuff.result->__ptr[i]->text_USCORE1;
				//TempObject TempSubmission = TempObject(TempSubName, TempSubOutPut);
				MySubList->push_back(TempObject(TempSubName, TempSubOutPut));
			}
			 //Populate Box With Titles Now...
			 for(list<TempObject>::iterator iterator = MySubList->begin(); iterator != MySubList->end(); ++iterator)
			{
				string temp = iterator->getName();
				String^ sm = gcnew String(temp.c_str());
				StudentAssignmentsComboBox->Items->Add(sm);
			}
			 std::string testString = "testing";
		 }
private: System::Void addStudentMenu_Click(System::Object^  sender, System::EventArgs^  e) {
			 //ADD A STUDENT TO THE DATABASE FOR THE CLASS....
			 try
			 {
				std::string unManagedUId = "";
				 std::string unManagedPword = "";
				 std::string unManagedUName = "";
				 //show dialog box here for students.
				 bool isCreated = false;
				 while(isCreated == false)
				 {
					 StudentForm->ShowDialog();
					 if(StudentForm->getIsCanceled())
					 {
						 MessageBox::Show("Canceled Creating A Student...");
						 StudentForm->setIsCanceled(false);
						 break;
					 }
					 else // not canceled so try to make check for missing values.
					 {
						 String^ ManagedUID = StudentForm->getUId();
						 String^ ManagedPword= StudentForm->getPword();
						 String^ ManagedUName= StudentForm->getUname();
						 //marshal the strings here...
						 MarshalString(ManagedUID, unManagedUId);
						 MarshalString(ManagedPword, unManagedPword);
						 MarshalString(ManagedUName, unManagedUName);

						 if(unManagedUId == "" || unManagedPword == "" || unManagedUName == "")
						 {
							 MessageBox::Show("Missing Values, Please Insert Values or Cancel...");
						 }
						 else
						 {
							std::string Result = addStud(LoggedInUser,unManagedUId,unManagedPword, unManagedUName);
							if(Result == "success")
							{
								StudentForm->setIsCanceled(false);
								isCreated = true;
								button10_Click(sender,e);
								StudentForm->clearInfo();
							}
							else
								MessageBox::Show("Error Adding Student!\nMake Sure not Duplicate Student\nOR\nCheck Internet Connection...");
						 }
					 }
				 }
				 isCreated = false;
			 }
			 catch(...)
			 {
				 MessageBox::Show("Error Adding Student!\nMake Sure not Duplicate Student\nOR\nCheck Internet Connection...");
			 }
		 }
private: System::Void button7_Click(System::Object^  sender, System::EventArgs^  e) {
			 ns1__Assignment AssignmentToEdit = ns1__Assignment(); // assignment to delete.
			//Find Assingment to Delete that matches description given
			String ^ManagedDescription = AssignmentComboBox->Text;
			string unmanagedDescription;
			MarshalString(ManagedDescription, unmanagedDescription);
			int i = 0;
			for(i=0; i < Assignments.result->__size; i++)
				{
					//result.result->__ptr[i]->description;
					string Descrip = Assignments.result->__ptr[i]->description;
					if(unmanagedDescription == Descrip)
					{
						
							AssignmentToEdit.description=Assignments.result->__ptr[i]->description ;	
							AssignmentToEdit.instructions=Assignments.result->__ptr[i]->instructions;	
							AssignmentToEdit.number=Assignments.result->__ptr[i]->number;	
							AssignmentToEdit.assignmentId=Assignments.result->__ptr[i]->assignmentId;	
							AssignmentToEdit.submitted=Assignments.result->__ptr[i]->submitted;	
							AssignmentToEdit.soap=Assignments.result->__ptr[i]->soap;	
							break;
					}
					
				}
			 ns1__Assignment aEdit = (ns1__Assignment)*Assignments.result->__ptr[i];
			 String ^ManagedTitle = editAssignmentTitle->Text;
			 string unmanagedTitle = "";
			 MarshalString(ManagedTitle, unmanagedTitle);
			 String ^ManagedInstructions = AssignmentTextBox->Text;
			 string unmanagedInstructions = "";
			 MarshalString(ManagedInstructions, unmanagedInstructions);
			 AssignmentEdit(unmanagedTitle, unmanagedInstructions, aEdit);
			 editAssignmentTitle->Text = "";
			 button9_Click(sender,e);
		 }
private: System::Void AssignmentPanel_Paint(System::Object^  sender, System::Windows::Forms::PaintEventArgs^  e) {
		 }
private: System::Void showStudentAssignmentsMenu_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
private: System::Void addAdministratorToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 addAdministrator();
		 }
private: System::Void addTeacherToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 addTeach();
		 }
private: System::Void StudentAssignmentsComboBox_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
			 string SelectedText = "Test";
			 String^ SelectedItem = StudentAssignmentsComboBox->Text;
			 MarshalString(SelectedItem, SelectedText);
			 //Search List For Given assignment.
			 String^ sm = gcnew String(SelectedText.c_str());
			 StudentAssignmentDescriptionsBox->Text = sm;
			

			 for(list<TempObject>::iterator iterator = MySubList->begin(); iterator != MySubList->end(); ++iterator)
			{
				if(iterator->getName() == SelectedText)
				{
					string Descr = iterator->getDescription();
					String^ TempDesc = gcnew String(Descr.c_str());
					 StudentAssignmentDescriptionsBox->Text = TempDesc;		
				}
			}
		 }
private: System::Void button9_Click(System::Object^  sender, System::EventArgs^  e) {
			 //add code here that updates the Assignments list...

			Assignments = getAssignmentStuff(LoggedInUser);
			std::string Descrip;
			std::string AssignmentInformation;
			//Put in coder here to populate the assignments field.
			Mylist->clear();
			AssignmentComboBox->Items->Clear();
			AssignmentComboBox->Text = "";
			AssignmentTextBox->Text = "";
			for(int i = 0; i < Assignments.result->__size; i++)
			{
				//result.result->__ptr[i]->description;
				Descrip = Assignments.result->__ptr[i]->description;
				AssignmentInformation =  Assignments.result->__ptr[i]->instructions;
				Mylist->push_back(TempObject(Descrip, AssignmentInformation));
			}
		//Now Populate the Assignment Combo Box with the proper Fields.
			for(list<TempObject>::iterator iterator = Mylist->begin(); iterator != Mylist->end(); ++iterator)
			{
				string temp = iterator->getName();
				String^ sm = gcnew String(temp.c_str());
				AssignmentComboBox->Items->Add(sm);
			}


		 }
private: System::Void springLaunchToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			 continueSimulation = true;
			 if(timer1->Enabled == false)
			 {
				 selectedSim = 5;
				 SimulationTabs->Width = 532;
				 SimulationTabs->Height = 261;
				 //SimulationTabs->Location = Point(720,27);
				 SimulationTabs->SelectedIndex = 4;
				 SimulationTabs->Visible = true;
				 ResultsPanel->Enabled=false;
				 ResultsPanel->Visible=false;
				 if(showAssignments == true)
				 {
					AssignmentPanel->Enabled=true;
					AssignmentPanel->Visible=true;
				 }
				 else
				 {
					 AssignmentPanel->Visible = false;
					 AssignmentPanel->Enabled = false;
				 }
				 label5->Visible = false;
				 OpenGL->sim5Init((float)num5Mass->Value, (float)num5K->Value, (float)num5Compress->Value, (float)num5COF->Value);
				 OpenGL->sim5();
			 }
			 else
				  MessageBox::Show("Must Stop Simulation First");

		 }
private: System::Void button8_Click(System::Object^  sender, System::EventArgs^  e) {
			restartSimulationToolStripMenuItem_Click(sender, e);
		 }
private: Void writeResults5() {
			float m, K, COF, compressX;
			float Afric, initV, finalT, finalX; // Afric = acceleration due to friction. Equals Ffric / mass

			m = (float)num5Mass->Value;
			K = (float)num5K->Value;
			compressX = (float)num5Compress->Value;
			COF = (float)num5COF->Value;

			Afric = g * COF; // mass drops out of the equation when calculating Acceleration due to friction

			initV = sqrt(K*pow(compressX, 2) / m);

			finalT = initV / Afric; //sqrt(2*initV / Afric); // fail integration
			finalX = initV * finalT - Afric * pow(finalT, 2) / 2; //initV * pow(finalT, 2) / 2; // fail integration

			lbl5V->Text = initV.ToString();
			lbl5T->Text = finalT.ToString();
			lbl5X->Text = finalX.ToString();
		 }
private: System::Void button10_Click(System::Object^  sender, System::EventArgs^  e) {
			 try
			 {
				 ns2__getStudentListResponse StudentList = getStudentList(LoggedInUser);
				 //Now that I have the list... use it to populate the Student drop down box.
				 StudentComboBox->Items->Clear();
				 for(int i = 0; i < StudentList.result->__size;i++)//uncomment after this is fixed
				 //for(int i = 0; i < 1;i++)
				 {
					 std::string StudentName = StudentList.result->__ptr[i]->userId;
					 String^ StudName = gcnew String(StudentName.c_str());
					 StudentComboBox->Items->Add(StudName);
				 }
			 }
			 catch(...)
			 {
				 MessageBox::Show("Something Went Wrong Updating Student List...");
			 }
		 }
private: System::Void StudentComboBox_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) {
			 //get the text from the StudentComboBox
			 String ^ManagedStudentName = StudentComboBox->Text;
			 std::string unManagedStudentName ="";
			 MarshalString(ManagedStudentName, unManagedStudentName);

			 ns2__getStudentsSimulationsResponse submittedStuff;
			 submittedStuff = getStudSimulations(LoggedInUser,unManagedStudentName);
			 //Get the Information out of it here...
			
			 StudentAssignmentsComboBox->Items->Clear();
			 StudentAssignmentsComboBox->Text = "";
			 StudentAssignmentDescriptionsBox->Text = "";
			 MySubList = new list<TempObject>();
			 MySubList->clear();
			 for(int i = 0; i < submittedStuff.result->__size; i++)
			{
				std::string TempSubName = submittedStuff.result->__ptr[i]->text_USCORE3;
				std::string TempSubOutPut = submittedStuff.result->__ptr[i]->text_USCORE1;
				//TempObject TempSubmission = TempObject(TempSubName, TempSubOutPut);
				MySubList->push_back(TempObject(TempSubName, TempSubOutPut));
			}
			 //Populate Box With Titles Now...
			 for(list<TempObject>::iterator iterator = MySubList->begin(); iterator != MySubList->end(); ++iterator)
			{
				string temp = iterator->getName();
				String^ sm = gcnew String(temp.c_str());
				StudentAssignmentsComboBox->Items->Add(sm);
			}
			 std::string testString = "testing";
		 }
private: System::Void hideAssignmentsToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			if(isloggedin)
			{ 
				 
			showAssignments = false;
			//AssignmentPanel->Enabled = false;
			AssignmentPanel->Visible = false;
			//OpenGL->sim1Init((float)BHeight->Value, (float)num1Velocity->Value, (float)num1COR->Value);
			if(selectedSim == 1)
				OpenGL->sim1();
			if(selectedSim == 2)
				OpenGL->sim2();
			if(selectedSim == 3)
				OpenGL->sim3();
			if(selectedSim == 4)
				OpenGL->sim4();
			if(selectedSim == 5)
				OpenGL->sim5();
			if(selectedSim == 6)
				OpenGL->sim6();
			if(selectedSim == 7)
				OpenGL->sim7();
			}
			else
				MessageBox::Show("Must Log In First...");
		 }
private: System::Void SimulationTabs_SelectedIndexChanged(System::Object^  sender, System::EventArgs^  e) { // tab selecting
			 if(SimulationTabs->SelectedIndex == 0)
			 {
				selectedSim = 1;
				//Resize
				SimulationTabs->Width = 532;
				SimulationTabs->Height = 178;
				label5->Visible = false;
				OpenGL->sim1Init((float)BHeight->Value, (float)num1Velocity->Value, (float)num1COR->Value);
				OpenGL->sim1();
			 }
			if(SimulationTabs->SelectedIndex == 1)
			{
				selectedSim = 2;
				SimulationTabs->Width = 532;
				SimulationTabs->Height = 292;
				label5->Visible = false;
				OpenGL->sim2Init((float)num2Mass1->Value, (float)num2Vel1->Value, (float)num2Mass2->Value, (float)num2Vel2->Value, (float)num2Dist->Value);
				OpenGL->sim2();
			}
			if(SimulationTabs->SelectedIndex == 2)
			{
				selectedSim = 3;
				SimulationTabs->Width = 532;
				SimulationTabs->Height = 159;
				label5->Visible = false;
				OpenGL->sim3Init((float)num3Height->Value, (float)num3Velocity->Value, (float)num3Angle->Value);
				OpenGL->sim3();
			}
			if(SimulationTabs->SelectedIndex == 3)
			{
				selectedSim = 4;
				SimulationTabs->Width = 532;
				SimulationTabs->Height = 226;
				label5->Visible = false;
				OpenGL->sim4Init((float)num4Mass1->Value, (float)num4Mass2->Value, (float)num4Angle->Value, (float)num4COF->Value);
				OpenGL->sim4();
			}
			if(SimulationTabs->SelectedIndex == 4)
			{
				selectedSim = 5;
				SimulationTabs->Width = 532;
				SimulationTabs->Height = 261;
				label5->Visible = false;
				OpenGL->sim5Init((float)num5Mass->Value, (float)num5K->Value, (float)num5Compress->Value, (float)num5COF->Value);
				OpenGL->sim5();
			}
			if(SimulationTabs->SelectedIndex == 5)
			{
				selectedSim = 6;
				SimulationTabs->Width = 532;
				SimulationTabs->Height = 232;
				label5->Visible = false;
				OpenGL->sim6Init((float)num6Mass1->Value, (float)num6Mass2->Value, (float)num6COF1->Value, (float)num6COF2->Value);
				OpenGL->sim6();
			}
			if(SimulationTabs->SelectedIndex == 6)
			{
				selectedSim = 7;
				SimulationTabs->Width = 532;
				SimulationTabs->Height = 178;
				label5->Visible = false;
				OpenGL->sim7Init();
				OpenGL->sim7();
			}

		 }
private: System::Void button11_Click(System::Object^  sender, System::EventArgs^  e) {
			 std::string unManagedStudentId = "";
			 String ^ManagedStudentId = StudentComboBox->Text;
			 MarshalString(ManagedStudentId, unManagedStudentId);
			 try
			 {
				 if(unManagedStudentId != "")
				 {
					std::string result = delUser(LoggedInUser, unManagedStudentId);
					if(result == "success")
					{
						MessageBox::Show("User Deleted");
						button10_Click(sender, e);
						StudentComboBox->Text = "";
						StudentAssignmentsComboBox->Items->Clear();
						StudentAssignmentsComboBox->Text = "";
						StudentAssignmentDescriptionsBox->Text = "";
					}
					else
					{
						MessageBox::Show("Something went wrong, no student deleted");
					}
				 }
				 else
					 MessageBox::Show("No Student Selected To Delete...");
			 }
			 catch(...)
			 {
				 MessageBox::Show("Error Communicating With Server...");
			 }
		 }
private: System::Void button12_Click(System::Object^  sender, System::EventArgs^  e) {
			restartSimulationToolStripMenuItem_Click(sender, e);
		 }
private: System::Void raceSimToolStripMenuItem_Click(System::Object^  sender, System::EventArgs^  e) {
			continueSimulation = true;
			 if(timer1->Enabled == false)
			 {
				 selectedSim = 6;
				 SimulationTabs->Width = 532;
				 SimulationTabs->Height = 232;
				 OpenGL->sim6Init((float)num6Mass1->Value, (float)num6Mass2->Value, (float)num6COF1->Value, (float)num6COF2->Value);
				 //SimulationTabs->Location = Point(720,27);
				 SimulationTabs->SelectedIndex = 5;
				 SimulationTabs->Visible = true;
				 //hideAllTabs();
				 //BallTab->Visible = true;
				 ResultsPanel->Enabled=false;
				 ResultsPanel->Visible=false;
				 if(showAssignments == true)
				 {
					AssignmentPanel->Enabled=true;
					AssignmentPanel->Visible=true;
				 }
				 else
				 {
					 AssignmentPanel->Visible = false;
					 AssignmentPanel->Enabled = false;
				 }
				 label5->Visible = false;
				 OpenGL->sim6Init((float)num6Mass1->Value, (float)num6Mass2->Value, (float)num6COF1->Value, (float)num6COF2->Value);
				 OpenGL->sim6();
			 }
			 else
				  MessageBox::Show("Must Stop Simulation First");
		 }
private: Void writeResults6() {
			float m1, m2, COF1, COF2;
			float xRamp, xFinish, xDiff;
			float angle, aRamp1, aRamp2, aFloor1, aFloor2, tRamp1, tRamp2, tFloor1, tFloor2; 
			float discriminant1, discriminant2, tQuad1, tQuad2;
			float maxV1, maxV2, tFinish1, tFinish2;

			xRamp = 20;
			xFinish = 80;
			xDiff = xRamp - xFinish; // this is correct. We want it to be negative for how it is used in Quadratic equation
			angle = 45 * PI / 180;

			m1 = (float)num6Mass1->Value;
			m2 = (float)num6Mass2->Value;
			COF1 = (float)num6COF1->Value;
			COF2 = (float)num6COF2->Value;

			aRamp1 = g * (sin(angle) - COF1 * cos(angle));
			aRamp2 = g * (sin(angle) - COF2 * cos(angle));
			aFloor1 = -COF1 * g;
			aFloor2 = -COF2 * g;

			//calculate the time it takes to get to end of ramp
			// note the multipled sqrt(2) term which must be added because the distance to cross the ramp is actually distance of the hypotenuse
			tRamp1 = sqrt(2 * xRamp * sqrt(2.0) / aRamp1);
			tRamp2 = sqrt(2 * xRamp * sqrt(2.0) / aRamp2);

			//max V happens at end of ramp. Calculate V at that time
			maxV1 = aRamp1 * tRamp1;
			maxV2 = aRamp2 * tRamp2;

			//calculate the time it takes to get from ramp to finish line

			//requires quadratic equation. Start by calculating discriminant (b^2 - 4ac) where c = xDiff, b = maxV, and a = 0.5*aFloor
			discriminant1 = pow(maxV1, 2) - 2 * xDiff * aFloor1;
			discriminant2 = pow(maxV2, 2) - 2 * xDiff * aFloor2;

			//negative discriminant means it never crosses finish line. Just set t very high to flag for this
			if (discriminant1 < 0)
			{
				tFloor1 = 100000;
			} else if (COF1 == 0) { // no friction. Use different equation
				tFloor1 = -xDiff / maxV1;
			} else {
				tQuad1 = (-maxV1 + sqrt(discriminant1)) / aFloor1;
				tQuad2 = (-maxV1 - sqrt(discriminant1)) / aFloor1;
				if (tQuad1 <= 0) // check that tQuad1 is > 0. If it is, tQuad1 represents when it crosses finish line first time, and tQuad2 represents when friction overcomes velocity and "pushes it back to finish line" (that is not what actually happens, but that is what it looks like to quadratic equation)
				{
					tFloor1 = tQuad2;
				} else {
					tFloor1 = tQuad1;
				}
			}

			if (discriminant2 < 0)
			{
				tFloor2 = 100000;
			} else if (COF2 == 0) {
				tFloor2 = -xDiff / maxV2;
			}else {
				tQuad1 = (-maxV2 + sqrt(discriminant2)) / aFloor2;
				tQuad2 = (-maxV2 - sqrt(discriminant2)) / aFloor2;
				if (tQuad1 <= 0)
				{
					tFloor2 = tQuad2;
				} else {
					tFloor2 = tQuad1;
				}
			}

			tFinish1 = tRamp1 + tFloor1;
			tFinish2 = tRamp2 + tFloor2;

			lbl6MaxV1->Text = maxV1.ToString();
			lbl6MaxV2->Text = maxV2.ToString();

			if (tFinish1 >= 100000)
			{
				lbl6FinishT1->Text = "n/a";
			} else {
				lbl6FinishT1->Text = tFinish1.ToString();
			}

			if (tFinish2 >= 100000)
			{
				lbl6FinishT2->Text = "n/a";
			} else {
				lbl6FinishT2->Text = tFinish2.ToString();
			}

			if (tFinish1 >= 100000 && tFinish2 >= 100000)
			{
				lbl6Winner->Text = "No Winner";
			} else if (tFinish1 == tFinish2) { // despite rounding errors, this should work because they should use exact same equations and get exact same results
				lbl6Winner->Text = "Tie";
			} else if (tFinish1 < tFinish2) {
				lbl6Winner->Text = "First Car";
			} else {
				lbl6Winner->Text = "Second Car";
			}
		 }
private: System::Void PulleyTab_Click(System::Object^  sender, System::EventArgs^  e) {
		 }
};
}

